]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4015: use test_write_lines()
authorDenton Liu <liu.denton@gmail.com>
Wed, 27 Nov 2019 19:53:26 +0000 (11:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Nov 2019 21:20:14 +0000 (13:20 -0800)
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>
t/t4015-diff-whitespace.sh

index 7fb83c8eff98589af63018c7a7e4573cbffae26f..4c540b1d70342f488ba804f669f501480a226a26 100755 (executable)
@@ -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
 '