summaryrefslogtreecommitdiff
path: root/t/t4036-format-patch-signer-mime.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-03-13 12:23:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-14 19:44:20 (GMT)
commit7f733de04e69c8ba40158d1da46c4aa121f714b6 (patch)
treef0a04a094103ded37b49affa1979bccda12820d8 /t/t4036-format-patch-signer-mime.sh
parent924189d6a2d13b18fbfdaa1725569957cf628807 (diff)
downloadgit-7f733de04e69c8ba40158d1da46c4aa121f714b6.zip
git-7f733de04e69c8ba40158d1da46c4aa121f714b6.tar.gz
git-7f733de04e69c8ba40158d1da46c4aa121f714b6.tar.bz2
test-suite: Make test script numbers unique
In order to selectively skip tests, the environment variable GIT_SKIP_TESTS can be set like this: $ GIT_SKIP_TESTS='t1301 t4150.18' make test That is, its value can contain only the test script numbers, but not the full script name. Therefore, it is important that the test scripts are uniquely numbered. This makes it so. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4036-format-patch-signer-mime.sh')
-rwxr-xr-xt/t4036-format-patch-signer-mime.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/t/t4036-format-patch-signer-mime.sh b/t/t4036-format-patch-signer-mime.sh
new file mode 100755
index 0000000..ba43f18
--- /dev/null
+++ b/t/t4036-format-patch-signer-mime.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+test_description='format-patch -s should force MIME encoding as needed'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ >F &&
+ git add F &&
+ git commit -m initial &&
+ echo new line >F &&
+
+ test_tick &&
+ git commit -m "This adds some lines to F" F
+
+'
+
+test_expect_success 'format normally' '
+
+ git format-patch --stdout -1 >output &&
+ ! grep Content-Type output
+
+'
+
+test_expect_success 'format with signoff without funny signer name' '
+
+ git format-patch -s --stdout -1 >output &&
+ ! grep Content-Type output
+
+'
+
+test_expect_success 'format with non ASCII signer name' '
+
+ GIT_COMMITTER_NAME="はまの ふにおう" \
+ git format-patch -s --stdout -1 >output &&
+ grep Content-Type output
+
+'
+
+test_expect_success 'attach and signoff do not duplicate mime headers' '
+
+ GIT_COMMITTER_NAME="はまの ふにおう" \
+ git format-patch -s --stdout -1 --attach >output &&
+ test `grep -ci ^MIME-Version: output` = 1
+
+'
+
+test_done
+