Skip to content

Commit

Permalink
Merge branch 'jc/t1506-shell-param-expansion-gotcha' into maint
Browse files Browse the repository at this point in the history
* jc/t1506-shell-param-expansion-gotcha:
  t1507: avoid "${parameter<op>'word'}" inside double-quotes
  • Loading branch information
Junio C Hamano committed May 16, 2011
2 parents 90e8b9b + 365c2aa commit a8793d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/t1506-rev-parse-diagnosis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ exec </dev/null

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

Expand Down

0 comments on commit a8793d2

Please sign in to comment.