diff mbox series

[v2,1/2] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_*

Message ID 20220218171224.262698-2-cogoni.guillaume@gmail.com (mailing list archive)
State Superseded
Headers show
Series [v2,1/2] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_* | expand

Commit Message

Guillaume Cogoni Feb. 18, 2022, 5:12 p.m. UTC
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>
---
 t/t3903-stash.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index b149e2af44..11a0856873 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -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)" &&
@@ -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)"
 '