Skip to content

Commit f01f948

Browse files
WoodfeaSIr-Lorrak
authored andcommitted
t/t3903-stash.sh: replace test [-d|-f] with test_path_is_*
Use test_path_is_* to replace test [-d|-f] because that give more explicit debugging information. And it doesn't change the semantics. Signed-off-by: COGONI Guillaume <[email protected]> Co-authored-by: BRESSAT Jonathan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2b9c120 commit f01f948

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t3903-stash.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ test_expect_failure 'stash directory to file' '
487487
rm -fr dir &&
488488
echo bar >dir &&
489489
git stash save "directory to file" &&
490-
test -d dir &&
490+
test_path_is_dir dir &&
491491
test foo = "$(cat dir/file)" &&
492492
test_must_fail git stash apply &&
493493
test bar = "$(cat dir)" &&
@@ -500,10 +500,10 @@ test_expect_failure 'stash file to directory' '
500500
mkdir file &&
501501
echo foo >file/file &&
502502
git stash save "file to directory" &&
503-
test -f file &&
503+
test_path_is_file file &&
504504
test bar = "$(cat file)" &&
505505
git stash apply &&
506-
test -f file/file &&
506+
test_path_is_file file/file &&
507507
test foo = "$(cat file/file)"
508508
'
509509

0 commit comments

Comments
 (0)