Skip to content

Commit 1136c77

Browse files
committed
Merge branch 'za/t2000-test-path-is-helpers' into seen
Test clean-up. * za/t2000-test-path-is-helpers: t2000: modernize path checks with test_path_is_* helpers
2 parents de42b5a + 81ca488 commit 1136c77

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

t/t2000-conflict-when-checking-files-out.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ test_expect_success \
5858

5959
test_expect_success \
6060
'git checkout-index conflicting paths.' \
61-
'test -f path0 && test -d path1 && test -f path1/file1'
61+
'test_path_is_file path0 &&
62+
test_path_is_dir path1 &&
63+
test_path_is_file path1/file1'
6264

6365
test_expect_success SYMLINKS 'checkout-index -f twice with --prefix' '
6466
mkdir -p tar/get &&
@@ -127,9 +129,9 @@ test_debug 'show_files $tree2'
127129

128130
test_expect_success \
129131
'checking out conflicting path with -f' \
130-
'test ! -h path2 && test -d path2 &&
131-
test ! -h path3 && test -d path3 &&
132-
test ! -h path2/file0 && test -f path2/file0 &&
133-
test ! -h path3/file1 && test -f path3/file1'
132+
'test_path_is_dir_not_symlink path2 &&
133+
test_path_is_dir_not_symlink path3 &&
134+
test_path_is_file_not_symlink path2/file0 &&
135+
test_path_is_file_not_symlink path3/file1'
134136

135137
test_done

0 commit comments

Comments
 (0)