]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1512: use test_line_count
authorRené Scharfe <l.s.r@web.de>
Tue, 26 Nov 2019 18:21:41 +0000 (19:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Nov 2019 02:31:40 +0000 (11:31 +0900)
Use test_line_count to check if the number of lines matches
expectations, for improved consistency and nicer debug output.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1512-rev-parse-disambiguation.sh

index c19fb500cb225273fce730c656fea00a3ada624d..f06b045edd071eb0f2344ef5b61a64dc35004834 100755 (executable)
@@ -282,7 +282,7 @@ test_expect_success 'rev-parse --disambiguate' '
        # commits created by commit-tree in earlier tests share a
        # different prefix.
        git rev-parse --disambiguate=000000000 >actual &&
-       test $(wc -l <actual) = 16 &&
+       test_line_count = 16 actual &&
        test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
 '