summaryrefslogtreecommitdiff
path: root/t/t5100-mailinfo.sh
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@landau.phys.spbu.ru>2009-01-13 01:21:04 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-28 16:23:21 -0800
commitc32815f903f50a44006f6d12da11492141e70d73 (patch)
tree8374b3bd260c1d832932943bdc3769d2c3546de0 /t/t5100-mailinfo.sh
parent806d5e90440046a7807f757d70acb29573f89524 (diff)
downloadgit-c32815f903f50a44006f6d12da11492141e70d73.tar.gz
mailinfo: tests for RFC2047 examples
Also as suggested by Junio, in order to try to catch other MIME problems, test cases from the "8. Examples" section of RFC2047 are added to t5100 testsuite as well. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Diffstat (limited to 't/t5100-mailinfo.sh')
-rwxr-xr-xt/t5100-mailinfo.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 497cb0dd9e..b851b3a175 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -25,6 +25,28 @@ do
diff ../t5100/info$mail info$mail"
done
+
+test_expect_success 'split box with rfc2047 samples' \
+ 'mkdir rfc2047 &&
+ git mailsplit -orfc2047 "$TEST_DIRECTORY"/t5100/rfc2047-samples.mbox \
+ >rfc2047/last &&
+ last=`cat rfc2047/last` &&
+ echo total is $last &&
+ test `cat rfc2047/last` = 11'
+
+for mail in `echo rfc2047/00*`
+do
+ test_expect_success "mailinfo $mail" '
+ git mailinfo -u $mail-msg $mail-patch <$mail >$mail-info &&
+ echo msg &&
+ test_cmp "$TEST_DIRECTORY"/t5100/empty $mail-msg &&
+ echo patch &&
+ test_cmp "$TEST_DIRECTORY"/t5100/empty $mail-patch &&
+ echo info &&
+ test_cmp "$TEST_DIRECTORY"/t5100/rfc2047-info-$(basename $mail) $mail-info
+ '
+done
+
test_expect_success 'respect NULs' '
git mailsplit -d3 -o. ../t5100/nul-plain &&