From b126b65b3381cd8659552b39699b3b3d9a4f5393 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 15 May 2023 19:26:46 -0700 Subject: test: do not negate test_path_is_* to assert absense These tests use "! test_path_is_dir" or "! test_path_is_file" to ensure that the path is not recursively checked out or "submodule update" did not touch the working tree. Use "test_path_is_missing" to assert that the path does not exist, instead of negating test_path_is_* helpers; they are designed to be loud in wrong occasions. Besides, negating "test_path_is_dir" would mean we would be happy if a file exists there, which is not the case for these tests. Signed-off-by: Junio C Hamano --- t/t5572-pull-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t5572-pull-submodule.sh') diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh index 09097eff3f..4e917bf87d 100755 --- a/t/t5572-pull-submodule.sh +++ b/t/t5572-pull-submodule.sh @@ -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 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)' ' -- cgit v1.2.3