Skip to content

Commit c205923

Browse files
committed
tests: do not negate test_path_exists
As a way to assert the path 'foo' is missing, "! test_path_exists foo" is a poor way to do so, as the helper is designed to complain when 'foo' is missing, but the intention of the author who used negated form was to make sure it does not exist. This does not help debugging the tests. Use test_path_is_missing instead, which is a more appropriate helper. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0df2c18 commit c205923

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

t/t4067-diff-partial-clone.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ test_expect_success 'diff does not fetch anything if inexact rename detection is
151151
152152
# Ensure no fetches.
153153
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff --raw -M HEAD^ HEAD &&
154-
! test_path_exists trace
154+
test_path_is_missing trace
155155
'
156156

157157
test_expect_success 'diff --break-rewrites fetches only if necessary, and batches blobs if it does' '
@@ -171,7 +171,7 @@ test_expect_success 'diff --break-rewrites fetches only if necessary, and batche
171171
172172
# Ensure no fetches.
173173
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff --raw -M HEAD^ HEAD &&
174-
! test_path_exists trace &&
174+
test_path_is_missing trace &&
175175
176176
# But with --break-rewrites, ensure that there is exactly 1 negotiation
177177
# by checking that there is only 1 "done" line sent. ("done" marks the

t/t4115-apply-symlink.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test_expect_success SYMLINKS 'symlink escape when creating new files' '
7474
error: affected file ${SQ}renamed-symlink/create-me${SQ} is beyond a symbolic link
7575
EOF
7676
test_cmp expected_stderr stderr &&
77-
! test_path_exists .git/create-me
77+
test_path_is_missing .git/create-me
7878
'
7979

8080
test_expect_success SYMLINKS 'symlink escape when modifying file' '

0 commit comments

Comments
 (0)