3
0

param_expand_default.tests 466 B

12345678910111213141516171819202122
  1. # first try some invalid patterns (do in subshell due to parsing error)
  2. "$THIS_SH" -c 'echo ${-}'
  3. "$THIS_SH" -c 'echo ${:-}'
  4. # now some funky ones
  5. echo _${#-} _${#:-}
  6. # now some valid ones
  7. set --
  8. echo _$1 _${1-} _${1:-} _${1-word} _${1:-word}
  9. set -- aaaa
  10. echo _$1 _${1-} _${1:-} _${1-word} _${1:-word}
  11. unset f
  12. echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
  13. f=
  14. echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
  15. f=fff
  16. echo _$f _${f-} _${f:-} _${f-word} _${f:-word}