spec test index / oilshell.org
27 passed, 0 OK, 0 not implemented, 0 BUG, 36 failed, 0 timeouts, 0 cases skipped 2 failed under osh
osh_.py | 0 command sub: errexit is NOT inherited and outer shell keeps going [osh_.py stdout] Expected 'one two\nparent status=0\n', got '\nparent status=0\n' stdout: parent status=0stderr: |
osh_.cc | 0 command sub: errexit is NOT inherited and outer shell keeps going [osh_.cc stdout] Expected 'one two\nparent status=0\n', got '\nparent status=0\n' stdout: parent status=0stderr: |
osh_.py | 1 command sub with inherit_errexit only [osh_.py stdout] Expected 'zero\none\nparent status=0\n', got 'zero\n\nparent status=0\n' stdout: zero parent status=0stderr: |
osh_.cc | 1 command sub with inherit_errexit only [osh_.cc stdout] Expected 'zero\none\nparent status=0\n', got 'zero\n\nparent status=0\n' stdout: zero parent status=0stderr: |
osh | 2 strict_errexit with command sub stops program [osh stdout] Expected u'', got '\nA\ndone\n' [osh status] Expected 1, got 0 stdout: A donestderr: if echo $( echo 1; false; echo 2); then ^~ [ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.CommandList) |
osh_.py | 2 strict_errexit with command sub stops program [osh_.py stdout] Expected u'', got '\nA\ndone\n' [osh_.py status] Expected 1, got 0 stdout: A donestderr: |
osh_.cc | 2 strict_errexit with command sub stops program [osh_.cc stdout] Expected u'', got '\nA\ndone\n' [osh_.cc status] Expected 1, got 0 stdout: A donestderr: |
osh | 3 {inherit,strict}_errexit: command sub with a single command [osh stdout] Expected u'', got '\nA\ndone\n' [osh status] Expected 1, got 0 stdout: A donestderr: |
osh_.py | 3 {inherit,strict}_errexit: command sub with a single command [osh_.py stdout] Expected u'', got '\nA\ndone\n' [osh_.py status] Expected 1, got 0 stdout: A donestderr: |
osh_.cc | 3 {inherit,strict}_errexit: command sub with a single command [osh_.cc stdout] Expected u'', got '\nA\ndone\n' [osh_.cc status] Expected 1, got 0 stdout: A donestderr: |
osh_.py | 4 command sub with more_errexit only [osh_.py stdout] Expected 'zero\none two\nparent status=0\n', got 'zero\n\nparent status=0\n' stdout: zero parent status=0stderr: |
osh_.cc | 4 command sub with more_errexit only [osh_.cc stdout] Expected 'zero\none two\nparent status=0\n', got 'zero\n\nparent status=0\n' stdout: zero parent status=0stderr: |
osh_.py | 5 command sub with inherit_errexit and more_errexit [osh_.py stdout] Expected 'zero\n', got 'zero\n\nparent status=0\n' [osh_.py status] Expected 1, got 0 stdout: zero parent status=0stderr: |
osh_.cc | 5 command sub with inherit_errexit and more_errexit [osh_.cc stdout] Expected 'zero\n', got 'zero\n\nparent status=0\n' [osh_.cc status] Expected 1, got 0 stdout: zero parent status=0stderr: |
osh_.py | 6 command sub: last command fails but keeps going and exit code is 0 [osh_.py stdout] Expected 'one\nstatus=0\n', got '\nstatus=0\n' stdout: status=0stderr: |
osh_.cc | 6 command sub: last command fails but keeps going and exit code is 0 [osh_.cc stdout] Expected 'one\nstatus=0\n', got '\nstatus=0\n' stdout: status=0stderr: |
osh_.py | 7 global assignment with command sub: middle command fails [osh_.py stdout] Expected 'one\ntwo\n', got '\n' stdout: stderr: |
osh_.cc | 7 global assignment with command sub: middle command fails [osh_.cc stdout] Expected 'one\ntwo\n', got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh_.py | 8 global assignment with command sub: last command fails and it aborts [osh_.py stdout] Expected u'', got 'status=0\n' [osh_.py status] Expected 1, got 0 stdout: status=0stderr: |
osh_.cc | 8 global assignment with command sub: last command fails and it aborts [osh_.cc stdout] Expected u'', got 'status=0\n' [osh_.cc status] Expected 1, got 0 stdout: status=0stderr: |
osh_.py | 9 local: middle command fails and keeps going [osh_.py stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\n\n' stdout: good status=0stderr: |
osh_.cc | 9 local: middle command fails and keeps going [osh_.cc stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\n\n' stdout: good status=0stderr: |
osh_.py | 10 local: last command fails and also keeps going [osh_.py stdout] Expected 'good\nstatus=0\none\n', got 'good\nstatus=0\n\n' stdout: good status=0stderr: |
osh_.cc | 10 local: last command fails and also keeps going [osh_.cc stdout] Expected 'good\nstatus=0\none\n', got 'good\nstatus=0\n\n' stdout: good status=0stderr: |
osh_.py | 11 local and inherit_errexit / more_errexit [osh_.py stdout] Expected 'good\n', got 'good\nstatus=0\n\n' [osh_.py status] Expected 1, got 0 stdout: good status=0stderr: |
osh_.cc | 11 local and inherit_errexit / more_errexit [osh_.cc stdout] Expected 'good\n', got 'good\nstatus=0\n\n' [osh_.cc status] Expected 1, got 0 stdout: good status=0stderr: |
osh_.py | 14 strict_errexit prevents errexit from being disabled in function [osh_.py stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got "fun\nbuiltin ok\n(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])\n" stdout: fun builtin ok (cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])stderr: Unhandled SimpleCommand fun || true # this fails ^~~ [ stdin ]:7: fatal: can't disable errexit running a function. Maybe wrap the function in a process with the at-splice pattern. |
osh_.cc | 14 strict_errexit prevents errexit from being disabled in function [osh_.cc stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got "fun\nbuiltin ok\n(cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])\n" stdout: fun builtin ok (cmd_value.Argv argv:[env echo 'external ok'] arg_spids:[48 50 52])stderr: Unhandled SimpleCommand fun || true # this fails ^~~ [ stdin ]:7: fatal: can't disable errexit running a function. Maybe wrap the function in a process with the at-splice pattern. |
osh_.py | 16 strict_errexit prevents errexit from being disabled in subshell [osh_.py stdout] Expected 'foo\nbar\n', got '' stdout: stderr: ( echo foo; false; echo bar; ) || echo "failed" ^~ [ stdin ]:5: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Subshell) |
osh_.cc | 16 strict_errexit prevents errexit from being disabled in subshell [osh_.cc stdout] Expected 'foo\nbar\n', got '' stdout: stderr: shopt -s strict_errexit || true ^~~~~ [ stdin ]:4: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Subshell) |
osh_.py | 17 strict_errexit and ! && || if while until [osh_.py stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n', got "(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; ! fun; echo \\'should not get here\\''\n ]\n arg_spids: [9 11]\n)\nbang=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun || true']\n arg_spids: [27 29]\n)\nor=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun && true']\n arg_spids: [45 47]\n)\nand=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; if fun; then true; fi'\n ]\n arg_spids: [63 65]\n)\nif=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; while fun; do echo while; exit; done'\n ]\n arg_spids: [81 83]\n)\nwhile=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; until fun; do echo until; exit; done'\n ]\n arg_spids: [99 101]\n)\nuntil=0\n--\n" stdout: (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; ! fun; echo \'should not get here\'' ] arg_spids: [9 11] ) bang=0 -- (cmd_value.Argv argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun || true'] arg_spids: [27 29] ) or=0 -- (cmd_value.Argv argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun && true'] arg_spids: [45 47] ) and=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; if fun; then true; fi' ] arg_spids: [63 65] ) if=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; while fun; do echo while; exit; done' ] arg_spids: [81 83] ) while=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; until fun; do echo until; exit; done' ] arg_spids: [99 101] ) until=0 --stderr: Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 17 strict_errexit and ! && || if while until [osh_.cc stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n', got "(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; ! fun; echo \\'should not get here\\''\n ]\n arg_spids: [9 11]\n)\nbang=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun || true']\n arg_spids: [27 29]\n)\nor=0\n--\n(cmd_value.Argv\n argv: [-c 'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; fun && true']\n arg_spids: [45 47]\n)\nand=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; if fun; then true; fi'\n ]\n arg_spids: [63 65]\n)\nif=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; while fun; do echo while; exit; done'\n ]\n arg_spids: [81 83]\n)\nwhile=0\n--\n(cmd_value.Argv\n argv: [\n -c\n'set -o errexit\\nshopt -s strict_errexit || true\\nfun() { echo fun; }; until fun; do echo until; exit; done'\n ]\n arg_spids: [99 101]\n)\nuntil=0\n--\n" stdout: (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; ! fun; echo \'should not get here\'' ] arg_spids: [9 11] ) bang=0 -- (cmd_value.Argv argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun || true'] arg_spids: [27 29] ) or=0 -- (cmd_value.Argv argv: [-c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; fun && true'] arg_spids: [45 47] ) and=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; if fun; then true; fi' ] arg_spids: [63 65] ) if=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; while fun; do echo while; exit; done' ] arg_spids: [81 83] ) while=0 -- (cmd_value.Argv argv: [ -c 'set -o errexit\nshopt -s strict_errexit || true\nfun() { echo fun; }; until fun; do echo until; exit; done' ] arg_spids: [99 101] ) until=0 --stderr: Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 18 if pipeline doesn't fail fatally [osh_.py stdout] Expected 'done\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]\n)\nfoo\n\nfoo\n\ndone\n" stdout: (cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63]) (cmd_value.Argv argv: [ rm -f '/alpine' '/bin' '/boot' '/cdrom' '/dev' '/etc' '/home' '/initrd.img' '/initrd.img.old' '/lib' '/lib32' '/lib64' '/libx32' '/lost+found' '/media' '/mnt' '/nix' '/opt' '/proc' '/root' '/run' '/sbin' '/snap' '/srv' '/sys' '/tmp' '/usr' '/var' '/vmlinuz' '/vmlinuz.old' ] arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74] ) foo foo donestderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 18 if pipeline doesn't fail fatally [osh_.cc stdout] Expected 'done\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74]\n)\nfoo\n\nfoo\n\ndone\n" stdout: (cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[61 63]) (cmd_value.Argv argv: [ rm -f '/alpine' '/bin' '/boot' '/cdrom' '/dev' '/etc' '/home' '/initrd.img' '/initrd.img.old' '/lib' '/lib32' '/lib64' '/libx32' '/lost+found' '/media' '/mnt' '/nix' '/opt' '/proc' '/root' '/run' '/sbin' '/snap' '/srv' '/sys' '/tmp' '/usr' '/var' '/vmlinuz' '/vmlinuz.old' ] arg_spids: [70 72 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74] ) foo foo donestderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 19 if pipeline DOES fail fatally with strict_errexit [osh_.py stdout] Expected '! false ok\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]\n)\n" stdout: (cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81]) (cmd_value.Argv argv: [ rm -f '/alpine' '/bin' '/boot' '/cdrom' '/dev' '/etc' '/home' '/initrd.img' '/initrd.img.old' '/lib' '/lib32' '/lib64' '/libx32' '/lost+found' '/media' '/mnt' '/nix' '/opt' '/proc' '/root' '/run' '/sbin' '/snap' '/srv' '/sys' '/tmp' '/usr' '/var' '/vmlinuz' '/vmlinuz.old' ] arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92] )stderr: Unhandled SimpleCommand Unhandled SimpleCommand if ls $dir | grep ''; then ^~ [ stdin ]:9: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Pipeline) |
osh_.cc | 19 if pipeline DOES fail fatally with strict_errexit [osh_.cc stdout] Expected '! false ok\n', got "(cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81])\n(cmd_value.Argv\n argv: [\n rm\n -f\n '/alpine'\n '/bin'\n '/boot'\n '/cdrom'\n '/dev'\n '/etc'\n '/home'\n '/initrd.img'\n '/initrd.img.old'\n '/lib'\n '/lib32'\n '/lib64'\n '/libx32'\n '/lost+found'\n '/media'\n '/mnt'\n '/nix'\n '/opt'\n '/proc'\n '/root'\n '/run'\n '/sbin'\n '/snap'\n '/srv'\n '/sys'\n '/tmp'\n '/usr'\n '/var'\n '/vmlinuz'\n '/vmlinuz.old'\n ]\n arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92]\n)\n" stdout: (cmd_value.Argv argv:[rmdir '/_tmp'] arg_spids:[79 81]) (cmd_value.Argv argv: [ rm -f '/alpine' '/bin' '/boot' '/cdrom' '/dev' '/etc' '/home' '/initrd.img' '/initrd.img.old' '/lib' '/lib32' '/lib64' '/libx32' '/lost+found' '/media' '/mnt' '/nix' '/opt' '/proc' '/root' '/run' '/sbin' '/snap' '/srv' '/sys' '/tmp' '/usr' '/var' '/vmlinuz' '/vmlinuz.old' ] arg_spids: [88 90 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92] )stderr: Unhandled SimpleCommand Unhandled SimpleCommand local dir=$1 ^~~~~ [ stdin ]:8: fatal: errexit is disabled here, but strict_errexit disallows it with a compound command (command.Pipeline) |