summaryrefslogtreecommitdiff
path: root/t/t3403-rebase-skip.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3403-rebase-skip.sh')
-rwxr-xr-xt/t3403-rebase-skip.sh36
1 files changed, 31 insertions, 5 deletions
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index db7e917248..a927774910 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -97,9 +97,9 @@ test_expect_success 'correct advice upon picking empty commit' '
test_must_fail git rebase -i --onto goodbye \
amended-goodbye^ amended-goodbye 2>err &&
test_i18ngrep "previous cherry-pick is now empty" err &&
- test_i18ngrep "git cherry-pick --skip" err &&
+ test_i18ngrep "git rebase --skip" err &&
test_must_fail git commit &&
- test_i18ngrep "git cherry-pick --skip" err
+ test_i18ngrep "git rebase --skip" err
'
test_expect_success 'correct authorship when committing empty pick' '
@@ -120,9 +120,9 @@ test_expect_success 'correct advice upon rewording empty commit' '
--onto goodbye amended-goodbye^ amended-goodbye 2>err
) &&
test_i18ngrep "previous cherry-pick is now empty" err &&
- test_i18ngrep "git cherry-pick --skip" err &&
+ test_i18ngrep "git rebase --skip" err &&
test_must_fail git commit &&
- test_i18ngrep "git cherry-pick --skip" err
+ test_i18ngrep "git rebase --skip" err
'
test_expect_success 'correct advice upon editing empty commit' '
@@ -133,8 +133,34 @@ test_expect_success 'correct advice upon editing empty commit' '
--onto goodbye amended-goodbye^ amended-goodbye 2>err
) &&
test_i18ngrep "previous cherry-pick is now empty" err &&
- test_i18ngrep "git cherry-pick --skip" err &&
+ test_i18ngrep "git rebase --skip" err &&
test_must_fail git commit &&
+ test_i18ngrep "git rebase --skip" err
+'
+
+test_expect_success 'correct advice upon cherry-picking an empty commit during a rebase' '
+ test_when_finished "git rebase --abort" &&
+ (
+ set_fake_editor &&
+ test_must_fail env FAKE_LINES="1 exec_git_cherry-pick_amended-goodbye" \
+ git rebase -i goodbye^ goodbye 2>err
+ ) &&
+ test_i18ngrep "previous cherry-pick is now empty" err &&
+ test_i18ngrep "git cherry-pick --skip" err &&
+ test_must_fail git commit 2>err &&
+ test_i18ngrep "git cherry-pick --skip" err
+'
+
+test_expect_success 'correct advice upon multi cherry-pick picking an empty commit during a rebase' '
+ test_when_finished "git rebase --abort" &&
+ (
+ set_fake_editor &&
+ test_must_fail env FAKE_LINES="1 exec_git_cherry-pick_goodbye_amended-goodbye" \
+ git rebase -i goodbye^^ goodbye 2>err
+ ) &&
+ test_i18ngrep "previous cherry-pick is now empty" err &&
+ test_i18ngrep "git cherry-pick --skip" err &&
+ test_must_fail git commit 2>err &&
test_i18ngrep "git cherry-pick --skip" err
'