t3404: add a test for the --gpg-sign option

For the upcoming rebase--helper work (which will accelerate the interactive rebase noticably), it is important to verify that the --gpg-sign option is handled properly. Please note that this patch does this on the cheap, by verifying that the expected option is printed in the message of the 'edit' operation. We really should test that the interactive rebase signs the commits properly, iff GPG is available. This test is left for later. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 7, 2016 at 17:52 UTC 6672b9f962e4f01cae3c115ed54586a6f62aced3
1 file changed +8
t/t3404-rebase-interactive.sh
+8
@@ -1281,4 +1281,12 @@ test_expect_success 'editor saves as CR/LF' '
1281 )
1282 '
1283
1284 +SQ="'"
1285 +test_expect_success 'rebase -i --gpg-sign=<key-id>' '
1286 + set_fake_editor &&
1287 + FAKE_LINES="edit 1" git rebase -i --gpg-sign="\"S I Gner\"" HEAD^ \
1288 + >out 2>err &&
1289 + grep "$SQ-S\"S I Gner\"$SQ" err
1290 +'
1291 +
1292 test_done