msysGit-based Git for Windows 1.x was superseded by Git for Windows 2.x
[git/mingw/4msysgit.git] / t / t4036-format-patch-signer-mime.sh
blob98d9713d8b2454eb1dfc4f137133a7cb0174bd0d
1 #!/bin/sh
3 test_description='format-patch -s should force MIME encoding as needed'
5 . ./test-lib.sh
7 test_expect_success setup '
9 >F &&
10 git add F &&
11 git commit -m initial &&
12 echo new line >F &&
14 test_tick &&
15 git commit -m "This adds some lines to F" F
19 test_expect_success 'format normally' '
21 git format-patch --stdout -1 >output &&
22 ! grep Content-Type output
26 test_expect_success 'format with signoff without funny signer name' '
28 git format-patch -s --stdout -1 >output &&
29 ! grep Content-Type output
33 test_expect_success 'format with non ASCII signer name' '
35 GIT_COMMITTER_NAME="はまの ふにおう" \
36 git format-patch -s --stdout -1 >output &&
37 grep Content-Type output
41 test_expect_success 'attach and signoff do not duplicate mime headers' '
43 GIT_COMMITTER_NAME="はまの ふにおう" \
44 git format-patch -s --stdout -1 --attach >output &&
45 test $(grep -ci ^MIME-Version: output) = 1
49 test_done