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>
Denton Liu committed
Nov 27, 2019 at 11:53 UTC
afd43c99054a3d666e150bcee66183169b67df7f
1 file changed
+2
-2
t/t4015-diff-whitespace.sh
+2
-2
@@ -771,9 +771,9 @@ test_expect_success 'checkdiff detects new trailing blank lines (1)' '
771
'
772
773
test_expect_success 'checkdiff detects new trailing blank lines (2)' '
774
- { echo a; echo b; echo; echo; } >x &&
774
+ test_write_lines a b "" "" >x &&
775
git add x &&
776
- { echo a; echo; echo; echo; echo; } >x &&
776
+ test_write_lines a "" "" "" "" >x &&
777
test_must_fail git diff --check >check &&
778
grep "new blank line" check
779
'