]> git.ipfire.org Git - thirdparty/git.git/blob - t/t4028-format-patch-mime-headers.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t4028-format-patch-mime-headers.sh
1 #!/bin/sh
2
3 test_description='format-patch mime headers and extra headers do not conflict'
4 . ./test-lib.sh
5
6 test_expect_success 'create commit with utf-8 body' '
7 echo content >file &&
8 git add file &&
9 git commit -m one &&
10 echo more >>file &&
11 git commit -a -m "two
12
13 utf-8 body: ñ"
14 '
15
16 test_expect_success 'patch has mime headers' '
17 rm -f 0001-two.patch &&
18 git format-patch HEAD^ &&
19 grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
20 '
21
22 test_expect_success 'patch has mime and extra headers' '
23 rm -f 0001-two.patch &&
24 git config format.headers "x-foo: bar" &&
25 git format-patch HEAD^ &&
26 grep -i "x-foo: bar" 0001-two.patch &&
27 grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
28 '
29
30 test_done