@matheusbsbs / matheus-bagliano / commits / 0d913dfa7e
Fork 0

t3600: use test_line_count() where possible

Since we have a helper function that can test the number of lines in a file that gives better debugging information on failure, use test_line_count() to test the number of lines. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Nov 27, 2019 at 11:53 UTC 0d913dfa7e41f31befb080512d2e8524338f1907
1 file changed +4 -3
t/t3600-rm.sh
+4 -3
@@ -113,9 +113,10 @@ test_expect_success '"rm" command printed' '
113 echo frotz >test-file &&
114 git add test-file &&
115 git commit -m "add file for rm test" &&
116 - git rm test-file >rm-output &&
117 - test $(grep "^rm " rm-output | wc -l) = 1 &&
118 - rm -f test-file rm-output &&
116 + git rm test-file >rm-output.raw &&
117 + grep "^rm " rm-output.raw >rm-output &&
118 + test_line_count = 1 rm-output &&
119 + rm -f test-file rm-output.raw rm-output &&
120 git commit -m "remove file from rm test"
121 '
122