rebase -i: test "Nothing to do" case with autostash

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed May 20, 2014 at 09:49 UTC ddb5432d2390e1957e473618009ba3d2fbbf29a7
1 file changed +15
t/t3420-rebase-autostash.sh
+15
@@ -167,4 +167,19 @@ testrebase "" .git/rebase-apply
167 testrebase " --merge" .git/rebase-merge
168 testrebase " --interactive" .git/rebase-merge
169
170 +test_expect_success 'abort rebase -i with --autostash' '
171 + test_when_finished "git reset --hard" &&
172 + echo uncommited-content >file0 &&
173 + (
174 + write_script abort-editor.sh <<-\EOF &&
175 + echo >"$1"
176 + EOF
177 + test_set_editor "$(pwd)/abort-editor.sh" &&
178 + test_must_fail git rebase -i --autostash HEAD^ &&
179 + rm -f abort-editor.sh
180 + ) &&
181 + echo uncommited-content >expected &&
182 + test_cmp expected file0
183 +'
184 +
185 test_done