41 lines
1.2 KiB
Plaintext
Executable File
41 lines
1.2 KiB
Plaintext
Executable File
# do all of these in subshells since it's supposed to error out
|
|
|
|
# first try some invalid patterns
|
|
"$THIS_SH" -c 'echo ${?}'
|
|
"$THIS_SH" -c 'echo ${:?}'
|
|
|
|
# then some funky ones
|
|
"$THIS_SH" -c 'echo ${#?}'
|
|
"$THIS_SH" -c 'echo ${#:?}'
|
|
|
|
# now some valid ones
|
|
"$THIS_SH" -c 'set --; echo _$1'
|
|
"$THIS_SH" -c 'set --; echo _${1?}'
|
|
"$THIS_SH" -c 'set --; echo _${1:?}'
|
|
"$THIS_SH" -c 'set --; echo _${1?word}'
|
|
"$THIS_SH" -c 'set --; echo _${1:?word}'
|
|
|
|
"$THIS_SH" -c 'set -- aaaa; echo _$1'
|
|
"$THIS_SH" -c 'set -- aaaa; echo _${1?}'
|
|
"$THIS_SH" -c 'set -- aaaa; echo _${1:?}'
|
|
"$THIS_SH" -c 'set -- aaaa; echo _${1?word}'
|
|
"$THIS_SH" -c 'set -- aaaa; echo _${1:?word}'
|
|
|
|
"$THIS_SH" -c 'unset f; echo _$f'
|
|
"$THIS_SH" -c 'unset f; echo _${f?}'
|
|
"$THIS_SH" -c 'unset f; echo _${f:?}'
|
|
"$THIS_SH" -c 'unset f; echo _${f?word}'
|
|
"$THIS_SH" -c 'unset f; echo _${f:?word}'
|
|
|
|
"$THIS_SH" -c 'f=; echo _$f'
|
|
"$THIS_SH" -c 'f=; echo _${f?}'
|
|
"$THIS_SH" -c 'f=; echo _${f:?}'
|
|
"$THIS_SH" -c 'f=; echo _${f?word}'
|
|
"$THIS_SH" -c 'f=; echo _${f:?word}'
|
|
|
|
"$THIS_SH" -c 'f=fff; echo _$f'
|
|
"$THIS_SH" -c 'f=fff; echo _${f?}'
|
|
"$THIS_SH" -c 'f=fff; echo _${f:?}'
|
|
"$THIS_SH" -c 'f=fff; echo _${f?word}'
|
|
"$THIS_SH" -c 'f=fff; echo _${f:?word}'
|