47 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
| osh-cpp | 0 command sub: errexit is NOT inherited and outer shell keeps going [osh-cpp stdout] Expected 'one two\nparent status=0\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: echo $(echo one; false; echo two) # bash/ash keep going
^
[ stdin ]:2: Invalid word while parsing command list
|
| osh-cpp | 1 command sub with inherit_errexit only [osh-cpp stdout] Expected 'zero\none\nparent status=0\n' Got 'zero\n' [osh-cpp status] Expected 0 Got 2 stdout: zerostderr: echo $(echo one; false; echo two) # bash/ash keep going
^
[ stdin ]:4: Invalid word while parsing command list
|
| osh-cpp | 2 strict_errexit and assignment builtins (local, export, readonly ...) [osh-cpp status] Expected 1 Got 2 stdout: stderr: local x=$(echo hi; false)
^
[ stdin ]:5: Invalid word while parsing command list
|
| osh-cpp | 3 strict_errexit and command sub in export / readonly [osh-cpp stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n' Got 'status=2\nstatus=2\nstatus=2\n' stdout: status=2 status=2 status=2stderr: echo a; export x=$(might-fail); echo b
^
[ -c flag ]:1: Invalid word while parsing command list
echo a; readonly x=$(might-fail); echo b
^
[ -c flag ]:1: Invalid word while parsing command list
echo a; x=$(true); echo b
^
[ -c flag ]:1: Invalid word while parsing command list
|
| osh-cpp | 9 strict_errexit without errexit proc / command sub [osh-cpp status] Expected 1 Got 2 stdout: stderr: x=$(false)
^
[ stdin ]:6: Invalid word while parsing command list
|
| osh-cpp | 10 strict_errexit and errexit disabled [osh-cpp stdout] Expected 'before\nx=\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: x=$(false)
^
[ stdin ]:8: Invalid word while parsing command list
|
| osh-cpp | 11 command sub with command_sub_errexit only [osh-cpp stdout] Expected 'zero\none two\nparent status=0\n' Got 'zero\n' [osh-cpp status] Expected 0 Got 2 stdout: zerostderr: echo $(echo one; false; echo two) # bash/ash keep going
^
[ stdin ]:4: Invalid word while parsing command list
|
| osh-cpp | 12 command_sub_errexit stops at first error [osh-cpp stdout] Expected 'OK\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: echo $(date %d) $(touch BAD)
^
[ stdin ]:9: Invalid word while parsing command list
|
| osh-cpp | 13 command sub with inherit_errexit and command_sub_errexit [osh-cpp status] Expected 1 Got 2 stdout: zerostderr: echo $(echo one; false; echo two) # bash/ash keep going
^
[ stdin ]:6: Invalid word while parsing command list
|
| osh-cpp | 14 command sub: last command fails but keeps going and exit code is 0 [osh-cpp stdout] Expected 'one\nstatus=0\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: echo $(echo one; false) # we lost the exit code
^
[ stdin ]:2: Invalid word while parsing command list
|
| osh-cpp | 15 global assignment with command sub: middle command fails [osh-cpp stdout] Expected 'one\ntwo\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: s=$(echo one; false; echo two;)
^
[ stdin ]:2: Unexpected EOF while parsing command
|
| osh-cpp | 16 global assignment with command sub: last command fails and it aborts [osh-cpp status] Expected 1 Got 2 stdout: stderr: s=$(echo one; false)
^
[ stdin ]:2: Invalid word while parsing command list
|
| osh-cpp | 17 local: middle command fails and keeps going [osh-cpp stdout] Expected 'good\nstatus=0\none two\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: local x=$(echo one; false; echo two)
^
[ stdin ]:4: Invalid word while parsing command list
|
| osh-cpp | 18 local: last command fails and also keeps going [osh-cpp stdout] Expected 'good\nstatus=0\none\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: local x=$(echo one; false)
^
[ stdin ]:4: Invalid word while parsing command list
|
| osh-cpp | 19 local and inherit_errexit / command_sub_errexit [osh-cpp stdout] Expected 'good\n' Got '' [osh-cpp status] Expected 1 Got 2 stdout: stderr: local x=$(echo one; false; echo two)
^
[ stdin ]:6: Invalid word while parsing command list
|
| osh-cpp | 20 global assignment when last status is failure [osh-cpp stdout] Expected 'status=0\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: x=$(false) || true # from abuild
^
[ stdin ]:2: Invalid word while parsing command list
|
| osh-cpp | 27 command sub errexit preserves exit code [osh-cpp status] Expected 42 Got 2 stdout: beforestderr: echo $(exit 42)
^
[ stdin ]:5: Invalid word while parsing command list
|
| osh-cpp | 28 What's in strict:all? [osh-cpp status] Expected 1 Got 2 stdout: stderr: local d=$(date %x)
^
[ stdin ]:6: Invalid word while parsing command list
|
| osh-cpp | 29 command_sub_errexit causes local d=$(date %x) to fail [osh-cpp status] Expected 1 Got 2 stdout: stderr: local x=$(true)
^
[ stdin ]:6: Invalid word while parsing command list
|
| osh-cpp | 30 command_sub_errexit and command sub in array [osh-cpp status] Expected 1 Got 2 stdout: stderr: readonly -a myarray=( one "$(date %x)" two )
^
[ stdin ]:7: Invalid word while parsing command list
|
| osh-cpp | 31 OLD: command sub in conditional, with inherit_errexit [osh-cpp stdout] Expected '1 2\nA\ndone\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: if echo $(echo 1; false; echo 2); then
^
[ stdin ]:3: Invalid word while parsing command list
|
| osh-cpp | 32 OLD: command sub in redirect in conditional [osh-cpp stdout] Expected '2\ntmp_contents\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: if echo tmp_contents > $(echo tmp); then
^
[ stdin ]:3: Invalid word while parsing command list
|
| osh-cpp | 34 ShAssignment used as conditional [osh-cpp stdout] Expected 'yes\nyes\n' Got '' [osh-cpp status] Expected 1 Got 2 stdout: stderr: while x=$(false)
^
[ stdin ]:1: Invalid word while parsing command list
|