| 1 |
# For OSH only functionality
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#shopt -s verbose_errexit
|
| 6 |
|
| 7 |
# This turns on command_sub_errexit and fails
|
| 8 |
var x = $(echo bad; false)
|
| 9 |
echo 'unreachable'
|
| 10 |
|
| 11 |
pp test_ (x)
|
| 12 |
|
| 13 |
## status: 1
|
| 14 |
## STDOUT:
|
| 15 |
## END
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#shopt -s verbose_errexit
|
| 21 |
|
| 22 |
# I don't understand why this doesn't fail
|
| 23 |
var x = $(echo one; false; echo two)
|
| 24 |
echo 'unreachable'
|
| 25 |
|
| 26 |
pp test_ (x)
|
| 27 |
|
| 28 |
## status: 1
|
| 29 |
## STDOUT:
|
| 30 |
## END
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
touch {foo,bar}.txt
|
| 36 |
|
| 37 |
echo $["*.txt"]
|
| 38 |
|
| 39 |
## STDOUT:
|
| 40 |
*.txt
|
| 41 |
## END
|