Skip to content

Commit a8793d2

Browse files
committed
Merge branch 'jc/t1506-shell-param-expansion-gotcha' into maint
* jc/t1506-shell-param-expansion-gotcha: t1507: avoid "${parameter<op>'word'}" inside double-quotes
2 parents 90e8b9b + 365c2aa commit a8793d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

t/t1506-rev-parse-diagnosis.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ exec </dev/null
88

99
test_did_you_mean ()
1010
{
11-
printf "fatal: Path '$2$3' $4, but not ${5:-'$3'}.\n" >expected &&
12-
printf "Did you mean '$1:$2$3'${2:+ aka '$1:./$3'}?\n" >>expected &&
11+
sq="'" &&
12+
cat >expected <<-EOF &&
13+
fatal: Path '$2$3' $4, but not ${5:-$sq$3$sq}.
14+
Did you mean '$1:$2$3'${2:+ aka $sq$1:./$3$sq}?
15+
EOF
1316
test_cmp expected error
1417
}
1518

0 commit comments

Comments
 (0)