Skip to content

Commit b6e2a4f

Browse files
dschogitster
authored andcommitted
t2106: ensure that the checkout fails for the expected reason
During the transition of the test suite to a new default branch name, it was noticed that this test case succeeded for the wrong reason when the default branch name was overridden. While we fixed that in the previous commit, let's make sure that we look for a tell-tale in the error message that the `git checkout` failed for the reason we wanted it to fail. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bce46b1 commit b6e2a4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t2106-update-index-assume-unchanged.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ test_expect_success 'do not switch branches with dirty file' '
2020
git checkout other &&
2121
echo dirt >file &&
2222
git update-index --assume-unchanged file &&
23-
test_must_fail git checkout -
23+
test_must_fail git checkout - 2>err &&
24+
test_i18ngrep overwritten err
2425
'
2526

2627
test_done

0 commit comments

Comments
 (0)