[PATCH 06/12] t5520: use test_line_count where possible
- From
Denton Liu <liu.denton@gmail.com>
- Date
- Oct 17, 2019, 23:17 UTC
- Message-ID
- <7ffbbc329f0d49f63cf5fafc211a964e8238650c.1571354136.git.liu.denton@gmail.com>
- In-Reply-To
- <cover.1571354136.git.liu.denton@gmail.com>
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> --- t/t5520-pull.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 68b8822db2..9452779f40 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 ) '
-- 2.23.0.897.g0a19638b1e