Skip to content

Commit dc3fd24

Browse files
committed
Merge branch 'jc/do-not-negate-test-helpers'
Small fixes. * jc/do-not-negate-test-helpers: test: do not negate test_path_is_* to assert absense t2021: do not negate test_path_is_dir tests: do not negate test_path_exists
2 parents 1f141d6 + b126b65 commit dc3fd24

5 files changed

+7
-7
lines changed

t/lib-submodule-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ test_submodule_recursing_with_args_common () {
802802
git branch -t no_submodule origin/no_submodule &&
803803
$command no_submodule &&
804804
test_superproject_content origin/no_submodule &&
805-
! test_path_is_dir sub1 &&
805+
test_path_is_missing sub1 &&
806806
test_must_fail git config -f .git/modules/sub1/config core.worktree &&
807807
test_must_fail git config -f .git/modules/sub1/modules/sub2/config core.worktree
808808
)

t/t2021-checkout-overwrite.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test_expect_success 'checkout --overwrite-ignore should succeed if only ignored
7777
echo autogenerated information >some_dir/ignore &&
7878
echo ignore >.git/info/exclude &&
7979
git checkout --overwrite-ignore df_conflict &&
80-
! test_path_is_dir some_dir
80+
test_path_is_file some_dir
8181
'
8282

8383
test_done

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' '

t/t5572-pull-submodule.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ test_expect_success "fetch.recurseSubmodules option triggers recursive fetch (bu
121121
sub_oid=$(git -C child rev-parse HEAD) &&
122122
git -C super/sub cat-file -e $sub_oid &&
123123
# Check that the submodule worktree did not update
124-
! test_path_is_file super/sub/merge_strategy_5.t
124+
test_path_is_missing super/sub/merge_strategy_5.t
125125
'
126126

127127
test_expect_success "fetch.recurseSubmodules takes precedence over submodule.recurse" '
@@ -134,7 +134,7 @@ test_expect_success "fetch.recurseSubmodules takes precedence over submodule.rec
134134
sub_oid=$(git -C child rev-parse HEAD) &&
135135
git -C super/sub cat-file -e $sub_oid &&
136136
# Check that the submodule worktree did not update
137-
! test_path_is_file super/sub/merge_strategy_6.t
137+
test_path_is_missing super/sub/merge_strategy_6.t
138138
'
139139

140140
test_expect_success 'pull --rebase --recurse-submodules (remote superproject submodule changes, local submodule changes)' '

0 commit comments

Comments
 (0)