]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9903-bash-prompt.sh
The sixth batch for 2.26
[thirdparty/git.git] / t / t9903-bash-prompt.sh
index 81a5179e28bf529bc2f0a8bc197108fcb69fba72..88bc733ad6910ae0a2b11bb5e239f010cb2cdb72 100755 (executable)
@@ -180,7 +180,7 @@ test_expect_success 'prompt - interactive rebase' '
 '
 
 test_expect_success 'prompt - rebase merge' '
-       printf " (b2|REBASE-m 1/3)" >expected &&
+       printf " (b2|REBASE-i 1/3)" >expected &&
        git checkout b2 &&
        test_when_finished "git checkout master" &&
        test_must_fail git rebase --merge b1 b2 &&
@@ -211,8 +211,24 @@ test_expect_success 'prompt - merge' '
 
 test_expect_success 'prompt - cherry-pick' '
        printf " (master|CHERRY-PICKING)" >expected &&
-       test_must_fail git cherry-pick b1 &&
-       test_when_finished "git reset --hard" &&
+       test_must_fail git cherry-pick b1 b1^ &&
+       test_when_finished "git cherry-pick --abort" &&
+       __git_ps1 >"$actual" &&
+       test_cmp expected "$actual" &&
+       git reset --merge &&
+       test_must_fail git rev-parse CHERRY_PICK_HEAD &&
+       __git_ps1 >"$actual" &&
+       test_cmp expected "$actual"
+'
+
+test_expect_success 'prompt - revert' '
+       printf " (master|REVERTING)" >expected &&
+       test_must_fail git revert b1^ b1 &&
+       test_when_finished "git revert --abort" &&
+       __git_ps1 >"$actual" &&
+       test_cmp expected "$actual" &&
+       git reset --merge &&
+       test_must_fail git rev-parse REVERT_HEAD &&
        __git_ps1 >"$actual" &&
        test_cmp expected "$actual"
 '