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 <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Denton Liu 2019-11-27 11:53:26 -08:00 committed by Junio C Hamano
parent 946d2353a3
commit afd43c9905
1 changed files with 2 additions and 2 deletions

View File

@ -771,9 +771,9 @@ test_expect_success 'checkdiff detects new trailing blank lines (1)' '
' '


test_expect_success 'checkdiff detects new trailing blank lines (2)' ' 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 && git add x &&
{ echo a; echo; echo; echo; echo; } >x && test_write_lines a "" "" "" "" >x &&
test_must_fail git diff --check >check && test_must_fail git diff --check >check &&
grep "new blank line" check grep "new blank line" check
' '