spec test index / oilshell.org
122 passed, 23 OK, 49 not implemented, 3 BUG, 3 failed, 0 timeouts, 0 cases skipped 3 failed under osh
bash | 0 $- with -c stdout: huBcstderr: |
mksh | 0 $- with -c stdout: uhcstderr: |
bash | 1 $- with pipefail stdout: huBsstderr: |
dash | 1 $- with pipefail stdout: stderr: dash: 1: set: Illegal option -o pipefail |
mksh | 1 $- with pipefail stdout: ushstderr: |
dash | 2 $- and more options stdout: stderr: dash: 3: [[: not found |
dash | 6 pass shopt options like sh -O nullglob stdout: stderr: dash: 0: Illegal option -O dash: 0: Illegal option -O |
mksh | 6 pass shopt options like sh -O nullglob stdout: stderr: mksh: mksh: -O: unknown option mksh: mksh: -O: unknown option |
dash | 7 can continue after unknown option stdout: stderr: dash: 2: set: Illegal option -o STRICT |
mksh | 7 can continue after unknown option stdout: stderr: mksh: <stdin>[2]: set: STRICT: bad option |
dash | 10 vi and emacs are mutually exclusive stdout: ___ ___ ___stderr: dash: 2: shopt: not found dash: 2: shopt: not found dash: 2: shopt: not found |
mksh | 10 vi and emacs are mutually exclusive stdout: ___ ___ ___stderr: mksh: <stdin>[5]: shopt: not found mksh: <stdin>[8]: shopt: not found mksh: <stdin>[11]: shopt: not found |
dash | 11 interactive shell starts with emacs mode on stdout: stderr: |
mksh | 11 interactive shell starts with emacs mode on stdout: non-interactive 0 1 interactive 0 1stderr: mksh: can't find tty fd: No such device or address mksh: warning: won't have full job control |
dash | 12 nounset stdout: []stderr: dash: 3: unset: parameter not set |
dash | 13 -u is nounset stdout: []stderr: dash: 3: unset: parameter not set |
dash | 19 set -eu (flag parsing) stdout: stderr: dash: 2: unset: parameter not set |
osh | 20 -n for no execution (useful with --ast-output) [osh stdout] Expected '1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
dash | 21 pipefail stdout: 0stderr: dash: 3: set: Illegal option -o pipefail |
dash | 22 shopt -p -o prints 'set' options stdout: stderr: |
mksh | 22 shopt -p -o prints 'set' options stdout: stderr: |
dash | 23 shopt -o prints 'set' options stdout: stderr: |
mksh | 23 shopt -o prints 'set' options stdout: stderr: |
dash | 24 shopt -p prints 'shopt' options stdout: stderr: dash: 1: shopt: not found dash: 2: shopt: not found dash: 3: shopt: not found |
mksh | 24 shopt -p prints 'shopt' options stdout: stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[2]: shopt: not found mksh: <stdin>[3]: shopt: not found |
dash | 25 shopt with no flags prints options stdout: 0 one.txt 0stderr: dash: 3: shopt: not found dash: 8: shopt: not found |
mksh | 25 shopt with no flags prints options stdout: 0 one.txt 0stderr: mksh: <stdin>[3]: shopt: not found mksh: <stdin>[8]: shopt: not found |
dash | 27 noclobber on stdout: create=0 overwrite=2 force=0 forcestderr: dash: 7: cannot create no-clobber: File exists |
dash | 28 noclobber on <> stdout: .oostderr: dash: 4: read: Illegal option -n |
dash | 29 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
mksh | 29 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
dash | 30 SHELLOPTS is readonly stdout: status=0stderr: |
mksh | 30 SHELLOPTS is readonly stdout: status=0stderr: |
osh | 30 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' |
dash | 31 SHELLOPTS and BASHOPTS are set stdout: stderr: dash: 1: SHELLOPTS: parameter not set or null |
mksh | 31 SHELLOPTS and BASHOPTS are set stdout: stderr: mksh: <stdin>[1]: SHELLOPTS: parameter null or not set |
osh | 31 SHELLOPTS and BASHOPTS are set [osh status] Expected 0, got 1 stdout: stderr: echo shellopts ${SHELLOPTS:?} > /dev/null ^~~~~~~~~ [ stdin ]:1: fatal: Var SHELLOPTS is empty |
mksh | 32 set - - stdout: a b a b a b - + - --stderr: |
osh | 32 set - - stdout: a b - a b a b - - - + + - --stderr: |
dash | 34 set without args lists variables stdout: __GLOBAL='mutated' __OTHERLOCAL='L' __mylocal='L' __var_in_parent_scope='D'stderr: |
mksh | 34 set without args lists variables stdout: __GLOBAL=mutated __var_in_parent_scope=D __OTHERLOCAL=L __mylocal=Lstderr: |
dash | 36 set without args and array variables (not in OSH) stdout: stderr: dash: 1: declare: not found dash: 2: Syntax error: "(" unexpected |
mksh | 36 set without args and array variables (not in OSH) stdout: __array[0]=1 __array[1]=2 __array[2]='3 4'stderr: mksh: <stdin>[1]: declare: not found |
osh | 36 set without args and array variables (not in OSH) stdout: stderr: |
dash | 37 set without args and assoc array variables (not in OSH) stdout: stderr: dash: 1: typeset: not found dash: 2: __assoc[k e y]=v a l: not found dash: 3: __assoc[a]=b: not found |
mksh | 37 set without args and assoc array variables (not in OSH) stdout: stderr: mksh: <stdin>[1]: typeset: -A: unknown option mksh: <stdin>[2]: 'k e y': multi-character character constant |
osh | 37 set without args and assoc array variables (not in OSH) stdout: stderr: __assoc[a]=b ^~~~~~~~ [ stdin ]:3: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101) |
dash | 38 shopt -q stdout: nullglob=127 nullglob=127 nullglob,failglob=127 nullglob,failglob=127stderr: dash: 1: shopt: not found dash: 4: shopt: not found dash: 6: shopt: not found dash: 9: shopt: not found dash: 12: shopt: not found dash: 13: shopt: not found |
mksh | 38 shopt -q stdout: nullglob=127 nullglob=127 nullglob,failglob=127 nullglob,failglob=127stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[4]: shopt: not found mksh: <stdin>[6]: shopt: not found mksh: <stdin>[9]: shopt: not found mksh: <stdin>[12]: shopt: not found mksh: <stdin>[13]: shopt: not found |
bash | 39 shopt -q invalid stdout: invalidZZ=1stderr: bash: line 1: shopt: invalidZZ: invalid shell option name |
dash | 39 shopt -q invalid stdout: invalidZZ=127stderr: dash: 1: shopt: not found |
mksh | 39 shopt -q invalid stdout: invalidZZ=127stderr: mksh: <stdin>[1]: shopt: not found |
bash | 40 shopt -s strict:all stdout: - - -stderr: bash: line 9: shopt: strict:all: invalid shell option name bash: line 11: shopt: strict_arith: invalid shell option name |
dash | 40 shopt -s strict:all stdout: stderr: dash: 3: Syntax error: Bad function name |
mksh | 40 shopt -s strict:all stdout: - - -stderr: mksh: <stdin>[8]: shopt: not found mksh: <stdin>[9]: shopt: not found mksh: <stdin>[10]: shopt: not found mksh: <stdin>[11]: shopt: not found mksh: <stdin>[12]: shopt: not found |
dash | 41 shopt allows for backward compatibility like bash stdout: status=0stderr: dash: 3: shopt: not found dash: 8: shopt: not found |
mksh | 41 shopt allows for backward compatibility like bash stdout: status=0stderr: mksh: <stdin>[3]: shopt: not found mksh: <stdin>[8]: shopt: not found |
bash | 42 shopt -p validates option names stdout: shopt -u nullglob shopt -u failglob status=1 nullglob off failglob off status=1stderr: bash: line 1: shopt: invalid: invalid shell option name bash: line 3: shopt: invalid: invalid shell option name |
dash | 42 shopt -p validates option names stdout: status=127 status=127stderr: dash: 1: shopt: not found dash: 3: shopt: not found |
mksh | 42 shopt -p validates option names stdout: status=127 status=127stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[3]: shopt: not found |
bash | 43 shopt -p -o validates option names stdout: set +o errexit set +o nounset status=1stderr: bash: line 1: shopt: invalid: invalid option name |
dash | 43 shopt -p -o validates option names stdout: status=127stderr: dash: 1: shopt: not found |
mksh | 43 shopt -p -o validates option names stdout: status=127stderr: mksh: <stdin>[1]: shopt: not found |
bash | 44 stubbed out bash options stdout: 1 0 0 0stderr: bash: line 2: shopt: foo: invalid shell option name |
dash | 44 stubbed out bash options stdout: 127 127 127 127stderr: dash: 2: shopt: not found dash: 2: shopt: not found dash: 2: shopt: not found dash: 2: shopt: not found |
mksh | 44 stubbed out bash options stdout: 127 127 127 127stderr: mksh: <stdin>[4]: shopt: not found mksh: <stdin>[4]: shopt: not found mksh: <stdin>[4]: shopt: not found mksh: <stdin>[4]: shopt: not found |
bash | 45 shopt -s nounset works in YSH, not in bash stdout: status=1 nounset offstderr: bash: line 7: shopt: nounset: invalid shell option name |
dash | 45 shopt -s nounset works in YSH, not in bash stdout: N-Istderr: |
mksh | 45 shopt -s nounset works in YSH, not in bash stdout: N-Istderr: |
bash | 46 Unimplemented options - print, query, set, unset stdout: shopt -u xpg_echo q=1 shopt -s xpg_echo shopt -u xpg_echo p=1 noflag=1 set=1stderr: |
dash | 46 Unimplemented options - print, query, set, unset stdout: stderr: |
mksh | 46 Unimplemented options - print, query, set, unset stdout: stderr: |
osh | 46 Unimplemented options - print, query, set, unset [osh stdout] Expected 'TODO\n', got 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' stdout: shopt -u xpg_echo q=1 shopt -s xpg_echo shopt -u xpg_echo p=1 noflag=1 set=1stderr: |
dash | 47 Unimplemented options - OSH shopt -s ignore_shopt_not_impl stdout: stderr: |
mksh | 47 Unimplemented options - OSH shopt -s ignore_shopt_not_impl stdout: stderr: |
dash | 48 shopt -p exit code (regression) stdout: stderr: |
mksh | 48 shopt -p exit code (regression) stdout: stderr: |
bash | 49 no-ops not shown by shopt -p stdout: shopt -u xpg_echo --stderr: |