Merge branch 'js/rebase-p-tests'
[gitweb.git] / t / t5520-pull.sh
index 68aa5f0340132e8d3fabfd85aa70f1cdfe755cf3..cf4cc32fd0eb256b419f1da5605356fd4ce73014 100755 (executable)
@@ -461,7 +461,8 @@ test_expect_success 'pull.rebase=1 is treated as true and flattens keep-merge' '
        test file3 = "$(git show HEAD:file3.t)"
 '
 
-test_expect_success 'pull.rebase=preserve rebases and merges keep-merge' '
+test_expect_success REBASE_P \
+       'pull.rebase=preserve rebases and merges keep-merge' '
        git reset --hard before-preserve-rebase &&
        test_config pull.rebase preserve &&
        git pull . copy &&
@@ -475,10 +476,22 @@ test_expect_success 'pull.rebase=interactive' '
        false
        EOF
        test_set_editor "$TRASH_DIRECTORY/fake-editor" &&
+       test_when_finished "test_might_fail git rebase --abort" &&
        test_must_fail git pull --rebase=interactive . copy &&
        test "I was here" = "$(cat fake.out)"
 '
 
+test_expect_success 'pull --rebase=i' '
+       write_script "$TRASH_DIRECTORY/fake-editor" <<-\EOF &&
+       echo I was here, too >fake.out &&
+       false
+       EOF
+       test_set_editor "$TRASH_DIRECTORY/fake-editor" &&
+       test_when_finished "test_might_fail git rebase --abort" &&
+       test_must_fail git pull --rebase=i . copy &&
+       test "I was here, too" = "$(cat fake.out)"
+'
+
 test_expect_success 'pull.rebase=invalid fails' '
        git reset --hard before-preserve-rebase &&
        test_config pull.rebase invalid &&
@@ -502,7 +515,8 @@ test_expect_success '--rebase=true rebases and flattens keep-merge' '
        test file3 = "$(git show HEAD:file3.t)"
 '
 
-test_expect_success '--rebase=preserve rebases and merges keep-merge' '
+test_expect_success REBASE_P \
+       '--rebase=preserve rebases and merges keep-merge' '
        git reset --hard before-preserve-rebase &&
        test_config pull.rebase true &&
        git pull --rebase=preserve . copy &&