Skip to content

Commit

Permalink
t/t3903-stash.sh: replace test [-d|-f] with test_path_is_*
Browse files Browse the repository at this point in the history
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 <cogoni.guillaume@gmail.com>
Co-authored-by: BRESSAT Jonathan <git.jonathan.bressat@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
2 people authored and gitster committed Feb 23, 2022
1 parent 2b9c120 commit f01f948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/t3903-stash.sh
Expand Up @@ -487,7 +487,7 @@ test_expect_failure 'stash directory to file' '
rm -fr dir &&
echo bar >dir &&
git stash save "directory to file" &&
test -d dir &&
test_path_is_dir dir &&
test foo = "$(cat dir/file)" &&
test_must_fail git stash apply &&
test bar = "$(cat dir)" &&
Expand All @@ -500,10 +500,10 @@ test_expect_failure 'stash file to directory' '
mkdir file &&
echo foo >file/file &&
git stash save "file to directory" &&
test -f file &&
test_path_is_file file &&
test bar = "$(cat file)" &&
git stash apply &&
test -f file/file &&
test_path_is_file file/file &&
test foo = "$(cat file/file)"
'

Expand Down

0 comments on commit f01f948

Please sign in to comment.