X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4151-am-abort.sh;h=1176bcccf3b3f3708df04f49bfd084190cd27600;hb=6440d3417c1d51a20014d4b6fc6c59bacfa87dab;hp=2b912d77283fbd3fc02a7d9d6bca660e4193b8c3;hpb=77f143bf3e218857ec8e5244d7e862e8e0c1a041;p=git.git diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh index 2b912d772..1176bcccf 100755 --- a/t/t4151-am-abort.sh +++ b/t/t4151-am-abort.sh @@ -45,9 +45,10 @@ do test_expect_success "am$with3 --skip continue after failed am$with3" ' test_must_fail git am$with3 --skip >output && - test "$(grep "^Applying" output)" = "Applying: 6" && - test_cmp file-2-expect file-2 && - test ! -f .git/rr-cache/MERGE_RR + test_i18ngrep "^Applying" output >output.applying && + test_i18ngrep "^Applying: 6$" output.applying && + test_i18ncmp file-2-expect file-2 && + test ! -f .git/MERGE_RR ' test_expect_success "am --abort goes back after failed am$with3" ' @@ -57,9 +58,18 @@ do test_cmp expect actual && test_cmp file-2-expect file-2 && git diff-index --exit-code --cached HEAD && - test ! -f .git/rr-cache/MERGE_RR + test ! -f .git/MERGE_RR ' done +test_expect_success 'am --abort will keep the local commits intact' ' + test_must_fail git am 0004-*.patch && + test_commit unrelated && + git rev-parse HEAD >expect && + git am --abort && + git rev-parse HEAD >actual && + test_cmp expect actual +' + test_done