]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3507: use test_path_is_missing()
authorDenton Liu <liu.denton@gmail.com>
Tue, 7 Jan 2020 04:53:12 +0000 (23:53 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jan 2020 20:56:02 +0000 (12:56 -0800)
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>
t/t3507-cherry-pick-conflict.sh

index 2a0d119c8a3ce5b7f6490ca3c880a8a3ffbf201b..9bd482ce3b8912b2016fe2997c50d59b5a5162c5 100755 (executable)
@@ -168,7 +168,7 @@ test_expect_success 'successful final commit clears cherry-pick state' '
        echo resolved >foo &&
        test_path_is_file .git/sequencer/todo &&
        git commit -a &&
-       test_must_fail test_path_exists .git/sequencer
+       test_path_is_missing .git/sequencer
 '
 
 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' '
        echo resolved >foo &&
        test_path_is_file .git/sequencer/todo &&
        git reset &&
-       test_must_fail test_path_exists .git/sequencer
+       test_path_is_missing .git/sequencer
 '
 
 test_expect_success 'failed cherry-pick produces dirty index' '
@@ -387,7 +387,7 @@ test_expect_success 'successful final commit clears revert state' '
        echo resolved >foo &&
        test_path_is_file .git/sequencer/todo &&
        git commit -a &&
-       test_must_fail test_path_exists .git/sequencer
+       test_path_is_missing .git/sequencer
 '
 
 test_expect_success 'reset after final pick clears revert state' '
@@ -397,7 +397,7 @@ test_expect_success 'reset after final pick clears revert state' '
        echo resolved >foo &&
        test_path_is_file .git/sequencer/todo &&
        git reset &&
-       test_must_fail test_path_exists .git/sequencer
+       test_path_is_missing .git/sequencer
 '
 
 test_expect_success 'revert conflict, diff3 -m style' '