Skip to content

Commit b708776

Browse files
pabloosabaterrgitster
authored andcommitted
t9200: replace test -f/-d with modern path helpers
Replace old style 'test -f' and 'test -d' with helpers 'test_path_is_file' and 'test_path_is_dir' respectively, which make debugging a failing test easier by loudly reporting what expectation was not met. The instances were found with: git grep "test -[efd]" t/ Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 4aa72ea commit b708776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t9200-git-cvsexportcommit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export CVSROOT CVSWORK GIT_DIR
3131
rm -rf "$CVSROOT" "$CVSWORK"
3232

3333
cvs init &&
34-
test -d "$CVSROOT" &&
34+
test_path_is_dir "$CVSROOT" &&
3535
cvs -Q co -d "$CVSWORK" . &&
3636
echo >empty &&
3737
git add empty &&
@@ -303,7 +303,7 @@ test_expect_success 're-commit a removed filename which remains in CVS attic' '
303303
git commit -m "Added attic_gremlin" &&
304304
git cvsexportcommit -w "$CVSWORK" -c HEAD &&
305305
(cd "$CVSWORK" && cvs -Q update -d) &&
306-
test -f "$CVSWORK/attic_gremlin"
306+
test_path_is_file "$CVSWORK/attic_gremlin"
307307
'
308308

309309
# the state of the CVS sandbox may be indeterminate for ' space'

0 commit comments

Comments
 (0)