Merge branch 'rs/use-strbuf-complete-line'
[gitweb.git] / t / t5100-mailinfo.sh
index 3e64a7a65da86410dd0236975bef9bd0013a6405..60df10f46a52ea4ea33eded268beddc13fec29ea 100755 (executable)
@@ -35,6 +35,10 @@ do
                then
                        check_mailinfo $mail --no-inbody-headers
                fi
+               if test -f "$TEST_DIRECTORY"/t5100/msg$mail--message-id
+               then
+                       check_mailinfo $mail --message-id
+               fi
        '
 done
 
@@ -89,4 +93,22 @@ test_expect_success 'mailinfo on from header without name works' '
 
 '
 
+test_expect_success 'mailinfo finds headers after embedded From line' '
+       mkdir embed-from &&
+       git mailsplit -oembed-from "$TEST_DIRECTORY"/t5100/embed-from.in &&
+       test_cmp "$TEST_DIRECTORY"/t5100/embed-from.in embed-from/0001 &&
+       git mailinfo embed-from/msg embed-from/patch \
+         <embed-from/0001 >embed-from/out &&
+       test_cmp "$TEST_DIRECTORY"/t5100/embed-from.expect embed-from/out
+'
+
+test_expect_success 'mailinfo on message with quoted >From' '
+       mkdir quoted-from &&
+       git mailsplit -oquoted-from "$TEST_DIRECTORY"/t5100/quoted-from.in &&
+       test_cmp "$TEST_DIRECTORY"/t5100/quoted-from.in quoted-from/0001 &&
+       git mailinfo quoted-from/msg quoted-from/patch \
+         <quoted-from/0001 >quoted-from/out &&
+       test_cmp "$TEST_DIRECTORY"/t5100/quoted-from.expect quoted-from/msg
+'
+
 test_done