From c32815f903f50a44006f6d12da11492141e70d73 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Tue, 13 Jan 2009 01:21:04 +0300 Subject: 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 --- t/t5100-mailinfo.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 't/t5100-mailinfo.sh') 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 && -- cgit v1.2.1