Skip to content

Commit 2d88021

Browse files
committed
Merge branch 'es/t4301-sed-portability-fix'
Test clean-up. * es/t4301-sed-portability-fix: t4301: emit blank line in more idiomatic fashion t4301: fix broken &&-chains and add missing loop termination t4301: account for behavior differences between sed implementations
2 parents 5784d20 + 3871bdb commit 2d88021

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

t/t4301-merge-tree-write-tree.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ test_expect_success 'directory rename + content conflict' '
150150
cd dir-rename-and-content &&
151151
test_write_lines 1 2 3 4 5 >foo &&
152152
mkdir olddir &&
153-
for i in a b c; do echo $i >olddir/$i; done
153+
for i in a b c; do echo $i >olddir/$i || exit 1; done &&
154154
git add foo olddir &&
155155
git commit -m "original" &&
156156
@@ -176,7 +176,7 @@ test_expect_success 'directory rename + content conflict' '
176176
177177
test_expect_code 1 \
178178
git merge-tree -z A^0 B^0 >out &&
179-
printf "\\n" >>out &&
179+
echo >>out &&
180180
anonymize_hash out >actual &&
181181
q_to_tab <<-\EOF | lf_to_nul >expect &&
182182
HASH
@@ -230,7 +230,7 @@ test_expect_success 'rename/delete handling' '
230230
231231
test_expect_code 1 \
232232
git merge-tree -z A^0 B^0 >out &&
233-
printf "\\n" >>out &&
233+
echo >>out &&
234234
anonymize_hash out >actual &&
235235
q_to_tab <<-\EOF | lf_to_nul >expect &&
236236
HASH
@@ -284,7 +284,7 @@ test_expect_success 'rename/add handling' '
284284
285285
test_expect_code 1 \
286286
git merge-tree -z A^0 B^0 >out &&
287-
printf "\\n" >>out &&
287+
echo >>out &&
288288
289289
#
290290
# First, check that the bar that appears at stage 3 does not
@@ -351,7 +351,7 @@ test_expect_success SYMLINKS 'rename/add, where add is a mode conflict' '
351351
352352
test_expect_code 1 \
353353
git merge-tree -z A^0 B^0 >out &&
354-
printf "\\n" >>out &&
354+
echo >>out &&
355355
356356
#
357357
# First, check that the bar that appears at stage 3 does not
@@ -417,7 +417,7 @@ test_expect_success 'rename/rename + content conflict' '
417417
418418
test_expect_code 1 \
419419
git merge-tree -z A^0 B^0 >out &&
420-
printf "\\n" >>out &&
420+
echo >>out &&
421421
anonymize_hash out >actual &&
422422
q_to_tab <<-\EOF | lf_to_nul >expect &&
423423
HASH
@@ -471,7 +471,7 @@ test_expect_success 'rename/add/delete conflict' '
471471
472472
test_expect_code 1 \
473473
git merge-tree -z B^0 A^0 >out &&
474-
printf "\\n" >>out &&
474+
echo >>out &&
475475
anonymize_hash out >actual &&
476476
477477
q_to_tab <<-\EOF | lf_to_nul >expect &&
@@ -528,7 +528,7 @@ test_expect_success 'rename/rename(2to1)/delete/delete conflict' '
528528
529529
test_expect_code 1 \
530530
git merge-tree -z A^0 B^0 >out &&
531-
printf "\\n" >>out &&
531+
echo >>out &&
532532
anonymize_hash out >actual &&
533533
534534
q_to_tab <<-\EOF | lf_to_nul >expect &&
@@ -600,7 +600,7 @@ test_expect_success 'mod6: chains of rename/rename(1to2) and add/add via collidi
600600
601601
test_expect_code 1 \
602602
git merge-tree -z A^0 B^0 >out &&
603-
printf "\\n" >>out &&
603+
echo >>out &&
604604
605605
#
606606
# First, check that some of the hashes that appear as stage
@@ -662,7 +662,7 @@ test_expect_success 'directory rename + rename/delete + modify/delete + director
662662
cd 4-stacked-conflict &&
663663
test_write_lines 1 2 3 4 5 >foo &&
664664
mkdir olddir &&
665-
for i in a b c; do echo $i >olddir/$i; done
665+
for i in a b c; do echo $i >olddir/$i || exit 1; done &&
666666
git add foo olddir &&
667667
git commit -m "original" &&
668668
@@ -690,7 +690,7 @@ test_expect_success 'directory rename + rename/delete + modify/delete + director
690690
691691
test_expect_code 1 \
692692
git merge-tree -z A^0 B^0 >out &&
693-
printf "\\n" >>out &&
693+
echo >>out &&
694694
anonymize_hash out >actual &&
695695
696696
q_to_tab <<-\EOF | lf_to_nul >expect &&
@@ -760,8 +760,8 @@ test_expect_success 'NUL terminated conflicted file "lines"' '
760760
git commit -m "Renamed numbers" &&
761761
762762
test_expect_code 1 git merge-tree --write-tree -z tweak1 side2 >out &&
763+
echo >>out &&
763764
anonymize_hash out >actual &&
764-
printf "\\n" >>actual &&
765765
766766
# Expected results:
767767
# "greeting" should merge with conflicts

0 commit comments

Comments
 (0)