From: Denton Liu Date: Wed, 27 Nov 2019 19:53:26 +0000 (-0800) Subject: t4015: use test_write_lines() X-Git-Tag: v2.25.0-rc0~32^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afd43c99054a3d666e150bcee66183169b67df7f;p=thirdparty%2Fgit.git t4015: use test_write_lines() Instead of rolling our own method to write out some lines into a file, use the existing test_write_lines(). Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 7fb83c8eff..4c540b1d70 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -771,9 +771,9 @@ test_expect_success 'checkdiff detects new trailing blank lines (1)' ' ' test_expect_success 'checkdiff detects new trailing blank lines (2)' ' - { echo a; echo b; echo; echo; } >x && + test_write_lines a b "" "" >x && git add x && - { echo a; echo; echo; echo; echo; } >x && + test_write_lines a "" "" "" "" >x && test_must_fail git diff --check >check && grep "new blank line" check '