Merge branch 'jc/t1506-shell-param-expansion-gotcha'

* jc/t1506-shell-param-expansion-gotcha:
  t1507: avoid "${parameter<op>'word'}" inside double-quotes
This commit is contained in:
Junio C Hamano 2011-05-13 11:02:47 -07:00
Родитель ad29f71d53 365c2aaafc
Коммит d6ad4ff120
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -8,8 +8,11 @@ exec </dev/null
test_did_you_mean () test_did_you_mean ()
{ {
printf "fatal: Path '$2$3' $4, but not ${5:-'$3'}.\n" >expected && sq="'" &&
printf "Did you mean '$1:$2$3'${2:+ aka '$1:./$3'}?\n" >>expected && 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 test_cmp expected error
} }