test prerequisites: enumerate with commas
[gitweb.git] / t / t3420-rebase-autostash.sh
index 1bde00716046e5483b7121d31a455b41f82d8342..d783f03d3fc581eed08d8d2593e20ced3cbae200 100755 (executable)
@@ -152,8 +152,34 @@ test_expect_success "rebase: fast-forward rebase" '
        git checkout feature-branch
 '
 
+test_expect_success "rebase: noop rebase" '
+       test_config rebase.autostash true &&
+       git reset --hard &&
+       git checkout -b same-feature-branch feature-branch &&
+       test_when_finished git branch -D same-feature-branch &&
+       echo dirty >>file1 &&
+       git rebase feature-branch &&
+       grep dirty file1 &&
+       git checkout feature-branch
+'
+
 testrebase "" .git/rebase-apply
 testrebase " --merge" .git/rebase-merge
 testrebase " --interactive" .git/rebase-merge
 
+test_expect_success 'abort rebase -i with --autostash' '
+       test_when_finished "git reset --hard" &&
+       echo uncommited-content >file0 &&
+       (
+               write_script abort-editor.sh <<-\EOF &&
+                       echo >"$1"
+               EOF
+               test_set_editor "$(pwd)/abort-editor.sh" &&
+               test_must_fail git rebase -i --autostash HEAD^ &&
+               rm -f abort-editor.sh
+       ) &&
+       echo uncommited-content >expected &&
+       test_cmp expected file0
+'
+
 test_done