Merge branch 'jc/maint-format-patch' into maint
[gitweb.git] / t / t9001-send-email.sh
index 617e97d963dc4a9c794fbb148ac4022b2d4fff65..cb3d1837709fbce30fc508e339ce671c55eb9a1b 100755 (executable)
@@ -300,4 +300,17 @@ test_expect_success 'detects ambiguous reference/file conflict' '
        grep disambiguate errors
 '
 
+test_expect_success 'feed two files' '
+       rm -fr outdir &&
+       git format-patch -2 -o outdir &&
+       GIT_SEND_EMAIL_NOTTY=1 git send-email \
+       --dry-run \
+       --from="Example <nobody@example.com>" \
+       --to=nobody@example.com \
+       outdir/000?-*.patch 2>errors >out &&
+       grep "^Subject: " out >subjects &&
+       test "z$(sed -n -e 1p subjects)" = "zSubject: [PATCH 1/2] Second." &&
+       test "z$(sed -n -e 2p subjects)" = "zSubject: [PATCH 2/2] add master"
+'
+
 test_done