@matheusbsbs / matheus-bagliano / commits / a8c663cf65
Fork 0

t3507: use test_path_is_missing()

The test_must_fail() function should only be used for git commands since we should assume that external commands work sanely. Replace `test_must_fail test_path_exists` with `test_path_is_missing` since we expect these paths to not exist. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Jan 6, 2020 at 23:53 UTC a8c663cf65ae1e40c90bfd4a1dd3e8d1826eafbe
1 file changed +4 -4
t/t3507-cherry-pick-conflict.sh
+4 -4
@@ -168,7 +168,7 @@ test_expect_success 'successful final commit clears cherry-pick state' '
168 echo resolved >foo &&
169 test_path_is_file .git/sequencer/todo &&
170 git commit -a &&
171 - test_must_fail test_path_exists .git/sequencer
171 + test_path_is_missing .git/sequencer
172 '
173
174 test_expect_success 'reset after final pick clears cherry-pick state' '
@@ -178,7 +178,7 @@ test_expect_success 'reset after final pick clears cherry-pick state' '
178 echo resolved >foo &&
179 test_path_is_file .git/sequencer/todo &&
180 git reset &&
181 - test_must_fail test_path_exists .git/sequencer
181 + test_path_is_missing .git/sequencer
182 '
183
184 test_expect_success 'failed cherry-pick produces dirty index' '
@@ -387,7 +387,7 @@ test_expect_success 'successful final commit clears revert state' '
387 echo resolved >foo &&
388 test_path_is_file .git/sequencer/todo &&
389 git commit -a &&
390 - test_must_fail test_path_exists .git/sequencer
390 + test_path_is_missing .git/sequencer
391 '
392
393 test_expect_success 'reset after final pick clears revert state' '
@@ -397,7 +397,7 @@ test_expect_success 'reset after final pick clears revert state' '
397 echo resolved >foo &&
398 test_path_is_file .git/sequencer/todo &&
399 git reset &&
400 - test_must_fail test_path_exists .git/sequencer
400 + test_path_is_missing .git/sequencer
401 '
402
403 test_expect_success 'revert conflict, diff3 -m style' '