Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2021-12-09 08:11:05 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-13 21:29:48 +0300
commit0849541268a3aca9381591aed87b6864a203709b (patch)
tree00aa5e565425fd234928d17ad17e91c521d01d38 /t/t4116-apply-reverse.sh
parent020b813f400b55528edca00aff4d8e95080376f6 (diff)
tests: use test_write_lines() to generate line-oriented output
Take advantage of test_write_lines() to generate line-oriented output rather than using for-loops or a series of `echo` commands. Not only is test_write_lines() a natural fit for such a task, but there is less opportunity for a broken &&-chain. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4116-apply-reverse.sh')
-rwxr-xr-xt/t4116-apply-reverse.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh
index b99e65c086..fa3fa44e51 100755
--- a/t/t4116-apply-reverse.sh
+++ b/t/t4116-apply-reverse.sh
@@ -11,14 +11,14 @@ test_description='git apply in reverse
test_expect_success setup '
- for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
+ test_write_lines a b c d e f g h i j k l m n >file1 &&
perl -pe "y/ijk/\\000\\001\\002/" <file1 >file2 &&
git add file1 file2 &&
git commit -m initial &&
git tag initial &&
- for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
+ test_write_lines a b c g h i J K L m o n p q >file1 &&
perl -pe "y/mon/\\000\\001\\002/" <file1 >file2 &&
git commit -a -m second &&