Skip to content

Commit c66b470

Browse files
glandiumgitster
authored andcommitted
t/t8003-blame-corner-cases.sh: Use here documents
Somehow, this test was using: { echo A echo B } > file block to feed file contents. This changes those to the form most common in git test scripts: cat >file <<-\EOF A B EOF Signed-off-by: Mike Hommey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b75ee9 commit c66b470

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

t/t8003-blame-corner-cases.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ test_expect_success setup '
4141
test_tick &&
4242
GIT_AUTHOR_NAME=Fourth git commit -m Fourth &&
4343
44-
{
45-
echo ABC
46-
echo DEF
47-
echo XXXX
48-
echo GHIJK
49-
} >cow &&
44+
cat >cow <<-\EOF &&
45+
ABC
46+
DEF
47+
XXXX
48+
GHIJK
49+
EOF
5050
git add cow &&
5151
test_tick &&
5252
GIT_AUTHOR_NAME=Fifth git commit -m Fifth
@@ -115,24 +115,24 @@ test_expect_success 'append with -C -C -C' '
115115
test_expect_success 'blame wholesale copy' '
116116
117117
git blame -f -C -C1 HEAD^ -- cow | sed -e "$pick_fc" >current &&
118-
{
119-
echo mouse-Initial
120-
echo mouse-Second
121-
echo mouse-Third
122-
} >expected &&
118+
cat >expected <<-\EOF &&
119+
mouse-Initial
120+
mouse-Second
121+
mouse-Third
122+
EOF
123123
test_cmp expected current
124124
125125
'
126126

127127
test_expect_success 'blame wholesale copy and more' '
128128
129129
git blame -f -C -C1 HEAD -- cow | sed -e "$pick_fc" >current &&
130-
{
131-
echo mouse-Initial
132-
echo mouse-Second
133-
echo cow-Fifth
134-
echo mouse-Third
135-
} >expected &&
130+
cat >expected <<-\EOF &&
131+
mouse-Initial
132+
mouse-Second
133+
cow-Fifth
134+
mouse-Third
135+
EOF
136136
test_cmp expected current
137137
138138
'

0 commit comments

Comments
 (0)