format-patch: add "--rfc" for the common case of [RFC PATCH]
[gitweb.git] / t / t4014-format-patch.sh
index b0579dd45242f64d129d3c10e8ae1c3de6cc5458..ed4d3c2e59a63bd25478f7654bab20bcb35fd29c 100755 (executable)
@@ -1073,6 +1073,15 @@ test_expect_success 'empty subject prefix does not have extra space' '
        test_cmp expect actual
 '
 
+test_expect_success '--rfc' '
+       cat >expect <<-\EOF &&
+       Subject: [RFC PATCH 1/1] header with . in it
+       EOF
+       git format-patch -n -1 --stdout --rfc >patch &&
+       grep ^Subject: patch >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success '--from=ident notices bogus ident' '
        test_must_fail git format-patch -1 --stdout --from=foo >patch
 '