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/t5300-pack-object.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/t5300-pack-object.sh')
-rwxr-xr-xt/t5300-pack-object.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index e13a884207..f9877d42d7 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -361,11 +361,7 @@ test_expect_success 'unpacking with --strict' '
ST=$(git write-tree) &&
git rev-list --objects "$LIST" "$LI" "$ST" >actual &&
PACK5=$( git pack-objects test-5 <actual ) &&
- PACK6=$( (
- echo "$LIST"
- echo "$LI"
- echo "$ST"
- ) | git pack-objects test-6 ) &&
+ PACK6=$( test_write_lines "$LIST" "$LI" "$ST" | git pack-objects test-6 ) &&
test_create_repo test-5 &&
(
cd test-5 &&
@@ -408,11 +404,7 @@ test_expect_success 'index-pack with --strict' '
ST=$(git write-tree) &&
git rev-list --objects "$LIST" "$LI" "$ST" >actual &&
PACK5=$( git pack-objects test-5 <actual ) &&
- PACK6=$( (
- echo "$LIST"
- echo "$LI"
- echo "$ST"
- ) | git pack-objects test-6 ) &&
+ PACK6=$( test_write_lines "$LIST" "$LI" "$ST" | git pack-objects test-6 ) &&
test_create_repo test-7 &&
(
cd test-7 &&