Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
30
t/t4028-format-patch-mime-headers.sh
Executable file
30
t/t4028-format-patch-mime-headers.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='format-patch mime headers and extra headers do not conflict'
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'create commit with utf-8 body' '
|
||||
echo content >file &&
|
||||
git add file &&
|
||||
git commit -m one &&
|
||||
echo more >>file &&
|
||||
git commit -a -m "two
|
||||
|
||||
utf-8 body: ñ"
|
||||
'
|
||||
|
||||
test_expect_success 'patch has mime headers' '
|
||||
rm -f 0001-two.patch &&
|
||||
git format-patch HEAD^ &&
|
||||
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
|
||||
'
|
||||
|
||||
test_expect_success 'patch has mime and extra headers' '
|
||||
rm -f 0001-two.patch &&
|
||||
git config format.headers "x-foo: bar" &&
|
||||
git format-patch HEAD^ &&
|
||||
grep -i "x-foo: bar" 0001-two.patch &&
|
||||
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
|
||||
'
|
||||
|
||||
test_done
|
||||
Loading…
Add table
Add a link
Reference in a new issue