From 020b813f400b55528edca00aff4d8e95080376f6 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Thu, 9 Dec 2021 00:11:04 -0500 Subject: tests: simplify construction of large blocks of text Take advantage of here-docs to create large blocks of text rather than using a series of `echo` statements. Not only are here-docs a natural fit for such a task, but there is less opportunity for a broken &&-chain. Signed-off-by: Eric Sunshine Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t4106-apply-stdin.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/t4106-apply-stdin.sh') diff --git a/t/t4106-apply-stdin.sh b/t/t4106-apply-stdin.sh index 72467a1e8e..1e70810b9c 100755 --- a/t/t4106-apply-stdin.sh +++ b/t/t4106-apply-stdin.sh @@ -18,7 +18,10 @@ test_expect_success 'git apply --numstat - < patch' ' ' test_expect_success 'git apply --numstat - < patch patch' ' - for i in 1 2; do echo "1 1 text"; done >expect && + cat >expect <<-\EOF && + 1 1 text + 1 1 text + EOF git apply --numstat - < patch patch >actual && test_cmp expect actual ' -- cgit v1.2.3