]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1410: use test helpers in reflog rewind test
authorPushkar Singh <pushkarkumarsingh1970@gmail.com>
Sun, 11 Jan 2026 19:07:52 +0000 (19:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 04:55:05 +0000 (20:55 -0800)
Replace raw `test -f` and `! test -f` checks in the rewind test with
`test_path_is_file` and `test_path_is_missing`. This provides clearer
failure diagnostics and keeps the test consistent with the rest of
the test suite.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1410-reflog.sh

index e30f87a35812b8239be71042da361689284a2e27..ce71f9a30ae1ee54f678c6e99bbd0a82fd4041bc 100755 (executable)
@@ -130,10 +130,10 @@ test_expect_success 'pass through -- to sub-command' '
 
 test_expect_success rewind '
        test_tick && git reset --hard HEAD~2 &&
-       test -f C &&
-       test -f A/B/E &&
-       ! test -f F &&
-       ! test -f A/G &&
+       test_path_is_file C &&
+       test_path_is_file A/B/E &&
+       test_path_is_missing F &&
+       test_path_is_missing A/G &&
 
        check_have A B C D E F G H I J K L &&