@matheusbsbs / matheus-bagliano / commits / 3037d3db90
Fork 0

t5520: use test_line_count where possible

Instead of rolling our own functionality to test the number of lines a command outputs, use test_line_count() which provides better debugging information in the case of a failure. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Nov 12, 2019 at 15:08 UTC 3037d3db90c994cb3e5913a54f83acdefc219174
1 file changed +2 -1
t/t5520-pull.sh
+2 -1
@@ -699,7 +699,8 @@ test_expect_success 'git pull --rebase does not reapply old patches' '
699 (
700 cd dst &&
701 test_must_fail git pull --rebase &&
702 - test 1 = $(find .git/rebase-apply -name "000*" | wc -l)
702 + find .git/rebase-apply -name "000*" >patches &&
703 + test_line_count = 1 patches
704 )
705 '
706