From: Denton Liu Date: Tue, 12 Nov 2019 23:08:00 +0000 (-0800) Subject: t5520: use test_line_count where possible X-Git-Tag: v2.25.0-rc0~73^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3037d3db90c994cb3e5913a54f83acdefc219174;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 7bb9031140..0ca4867e96 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -699,7 +699,8 @@ test_expect_success 'git pull --rebase does not reapply old patches' ' ( cd dst && test_must_fail git pull --rebase && - test 1 = $(find .git/rebase-apply -name "000*" | wc -l) + find .git/rebase-apply -name "000*" >patches && + test_line_count = 1 patches ) '