t5401: prefer test_path_is_* helper function
"test -f" does not provide a nice error message when we hit test failures, so use test_path_is_file instead. Signed-off-by: ambar chakravartty <amch9605@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
ambar chakravartty committed
Feb 1, 2025 at 12:42 UTC
318f4c98276de7e515f838a9626bcf60d757ee20
1 file changed
+8
-8
t/t5401-update-hooks.sh
+8
-8
@@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '
64
'
65
66
test_expect_success 'hooks ran' '
67
- test -f victim.git/pre-receive.args &&
68
- test -f victim.git/pre-receive.stdin &&
69
- test -f victim.git/update.args &&
70
- test -f victim.git/update.stdin &&
71
- test -f victim.git/post-receive.args &&
72
- test -f victim.git/post-receive.stdin &&
73
- test -f victim.git/post-update.args &&
74
- test -f victim.git/post-update.stdin
67
+ test_path_is_file victim.git/pre-receive.args &&
68
+ test_path_is_file victim.git/pre-receive.stdin &&
69
+ test_path_is_file victim.git/update.args &&
70
+ test_path_is_file victim.git/update.stdin &&
71
+ test_path_is_file victim.git/post-receive.args &&
72
+ test_path_is_file victim.git/post-receive.stdin &&
73
+ test_path_is_file victim.git/post-update.args &&
74
+ test_path_is_file victim.git/post-update.stdin
75
'
76
77
test_expect_success 'pre-receive hook input' '