public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] t5315: use test_path_is_file for loose-object check
@ 2026-03-19 16:02 Bilal El Khatabi
  2026-03-19 16:26 ` Pablo
  2026-03-19 18:06 ` [GSOC PATCH v2] " Bilal El Khatabi
  0 siblings, 2 replies; 7+ messages in thread
From: Bilal El Khatabi @ 2026-03-19 16:02 UTC (permalink / raw)
  To: git; +Cc: bilalobe

From: bilalobe <elkhatabibilal@gmail.com>

Replace an assertion-style `test -f` check with `test_path_is_file`
in `t/t5315-pack-objects-compression.sh`.

This aligns the test with the path-checking helpers used in Git's test
suite.

Found with:
  git grep "test -[efd]" t/

Signed-off-by: bilalobe <elkhatabibilal@gmail.com>
---
 t/t5315-pack-objects-compression.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5315-pack-objects-compression.sh b/t/t5315-pack-objects-compression.sh
index 8bacd96275..d0feab17b4 100755
--- a/t/t5315-pack-objects-compression.sh
+++ b/t/t5315-pack-objects-compression.sh
@@ -10,7 +10,7 @@ test_expect_success setup '
 	# make sure it resulted in a loose object
 	ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
 	ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
-	test -f .git/objects/$ob/$ject
+	test_path_is_file .git/objects/$ob/$ject
 '
 
 while read expect config
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-20 10:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 16:02 [PATCH] t5315: use test_path_is_file for loose-object check Bilal El Khatabi
2026-03-19 16:26 ` Pablo
2026-03-19 18:35   ` Junio C Hamano
2026-03-19 18:06 ` [GSOC PATCH v2] " Bilal El Khatabi
2026-03-19 18:58   ` Junio C Hamano
2026-03-19 19:29     ` BILAL EL KHATABI
2026-03-20 10:08       ` Karthik Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox