t3404: check intermediate squash messages
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Fri, 10 Nov 2017 11:09:41 +0000 (11:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Nov 2017 18:33:26 +0000 (03:33 +0900)
When there is more than one squash/fixup command in a row check the
intermediate messages are correct.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3404-rebase-interactive.sh
index 6a82d1ed876dd5d1073dc63be8ba5720adbf12e3..9ed0a244e6cdf34c7caca8232f0c0a8cf4864c42 100755 (executable)
@@ -453,6 +453,10 @@ test_expect_success C_LOCALE_OUTPUT 'squash and fixup generate correct log messa
                git rebase -i $base &&
        git cat-file commit HEAD | sed -e 1,/^\$/d > actual-squash-fixup &&
        test_cmp expect-squash-fixup actual-squash-fixup &&
+       git cat-file commit HEAD@{2} |
+               grep "^# This is a combination of 3 commits\."  &&
+       git cat-file commit HEAD@{3} |
+               grep "^# This is a combination of 2 commits\."  &&
        git checkout to-be-rebased &&
        git branch -D squash-fixup
 '