Skip to contentSkip to conversation

t1512: use test_line_count

PATCH New René Scharfe 1 participant 1 message Nov 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t1512: use test_line_count

Use test_line_count to check if the number of lines matches expectations, for improved consistency and nicer debug output.

---
 t/t1512-rev-parse-disambiguation.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t1512-rev-parse-disambiguation.sh +1 -1
index c19fb500cb..f06b045edd 100755
@@ -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
 '
 

--
2.24.0