Browse Source

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
main
Junio C Hamano 2 years ago
parent
commit
dc3fd2486f
  1. 2
      t/lib-submodule-update.sh
  2. 2
      t/t2021-checkout-overwrite.sh
  3. 4
      t/t4067-diff-partial-clone.sh
  4. 2
      t/t4115-apply-symlink.sh
  5. 4
      t/t5572-pull-submodule.sh

2
t/lib-submodule-update.sh

@ -802,7 +802,7 @@ test_submodule_recursing_with_args_common () { @@ -802,7 +802,7 @@ test_submodule_recursing_with_args_common () {
git branch -t no_submodule origin/no_submodule &&
$command no_submodule &&
test_superproject_content origin/no_submodule &&
! test_path_is_dir sub1 &&
test_path_is_missing sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree &&
test_must_fail git config -f .git/modules/sub1/modules/sub2/config core.worktree
)

2
t/t2021-checkout-overwrite.sh

@ -77,7 +77,7 @@ test_expect_success 'checkout --overwrite-ignore should succeed if only ignored @@ -77,7 +77,7 @@ test_expect_success 'checkout --overwrite-ignore should succeed if only ignored
echo autogenerated information >some_dir/ignore &&
echo ignore >.git/info/exclude &&
git checkout --overwrite-ignore df_conflict &&
! test_path_is_dir some_dir
test_path_is_file some_dir
'

test_done

4
t/t4067-diff-partial-clone.sh

@ -151,7 +151,7 @@ test_expect_success 'diff does not fetch anything if inexact rename detection is @@ -151,7 +151,7 @@ test_expect_success 'diff does not fetch anything if inexact rename detection is

# Ensure no fetches.
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff --raw -M HEAD^ HEAD &&
! test_path_exists trace
test_path_is_missing trace
'

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 @@ -171,7 +171,7 @@ test_expect_success 'diff --break-rewrites fetches only if necessary, and batche

# Ensure no fetches.
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff --raw -M HEAD^ HEAD &&
! test_path_exists trace &&
test_path_is_missing trace &&

# But with --break-rewrites, ensure that there is exactly 1 negotiation
# by checking that there is only 1 "done" line sent. ("done" marks the

2
t/t4115-apply-symlink.sh

@ -74,7 +74,7 @@ test_expect_success SYMLINKS 'symlink escape when creating new files' ' @@ -74,7 +74,7 @@ test_expect_success SYMLINKS 'symlink escape when creating new files' '
error: affected file ${SQ}renamed-symlink/create-me${SQ} is beyond a symbolic link
EOF
test_cmp expected_stderr stderr &&
! test_path_exists .git/create-me
test_path_is_missing .git/create-me
'

test_expect_success SYMLINKS 'symlink escape when modifying file' '

4
t/t5572-pull-submodule.sh

@ -121,7 +121,7 @@ test_expect_success "fetch.recurseSubmodules option triggers recursive fetch (bu @@ -121,7 +121,7 @@ test_expect_success "fetch.recurseSubmodules option triggers recursive fetch (bu
sub_oid=$(git -C child rev-parse HEAD) &&
git -C super/sub cat-file -e $sub_oid &&
# Check that the submodule worktree did not update
! test_path_is_file super/sub/merge_strategy_5.t
test_path_is_missing super/sub/merge_strategy_5.t
'

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

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

Loading…
Cancel
Save