format-patch --notes: show notes after three-dashes
[gitweb.git] / t / t4014-format-patch.sh
index bea63814e6a58e930aa46e6728cc3442fc4ea4f4..9750ba69962a2d5adf393882402480b9a94091c8 100755 (executable)
@@ -623,9 +623,12 @@ test_expect_success 'format-patch --signoff' '
 test_expect_success 'format-patch --notes --signoff' '
        git notes --ref test add -m "test message" HEAD &&
        git format-patch -1 --signoff --stdout --notes=test >out &&
-       # Notes message must come after S-o-b
+       # Three dashes must come after S-o-b
        ! sed "/^Signed-off-by: /q" out | grep "test message" &&
-       sed "1,/^Signed-off-by: /d" out | grep "test message"
+       sed "1,/^Signed-off-by: /d" out | grep "test message" &&
+       # Notes message must come after three dashes
+       ! sed "/^---$/q" out | grep "test message" &&
+       sed "1,/^---$/d" out | grep "test message"
 '
 
 echo "fatal: --name-only does not make sense" > expect.name-only