]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5701: use the test_file_size() helper
authorPablo Sabater <pabloosabaterr@gmail.com>
Fri, 31 Jul 2026 19:49:35 +0000 (21:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Jul 2026 22:02:10 +0000 (15:02 -0700)
An object-info test uses 'wc -c <two.t | xargs' to get the file size.
Update it to use the test_file_size() helper instead.

Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Mentored-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5701-git-serve.sh

index 9a575aa098afd3e02b3bf691798f10208dd89f7a..b4d6beef11b7f7fb877b9d242e1d4bcf4b7bac95 100755 (executable)
@@ -356,8 +356,8 @@ test_expect_success 'basics of object-info' '
 
        cat >expect <<-EOF &&
        size
-       $(git rev-parse two:two.t) $(wc -c <two.t | xargs)
-       $(git rev-parse two:two.t) $(wc -c <two.t | xargs)
+       $(git rev-parse two:two.t) $(test_file_size two.t)
+       $(git rev-parse two:two.t) $(test_file_size two.t)
        0000
        EOF