mirror of
https://github.com/sheumann/hush.git
synced 2024-12-25 18:33:06 +00:00
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}'
|