spec test index / oilshell.org
149 passed, 24 OK, 40 not implemented, 3 BUG, 2 failed, 0 timeouts, 0 cases skipped 2 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: |
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: |
osh_ALT | 20 -n for no execution (useful with --ast-output) [osh_ALT 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: dash: 1: shopt: not found dash: 3: shopt: not found |
mksh | 22 shopt -p -o prints 'set' options stdout: stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[3]: shopt: not found |
dash | 23 shopt -p prints 'shopt' options stdout: stderr: dash: 1: shopt: not found dash: 2: shopt: not found dash: 3: shopt: not found |
mksh | 23 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 | 24 shopt with no flags prints options stdout: 0 one.txt 0stderr: dash: 3: shopt: not found dash: 8: shopt: not found |
mksh | 24 shopt with no flags prints options stdout: 0 one.txt 0stderr: mksh: <stdin>[3]: shopt: not found mksh: <stdin>[8]: shopt: not found |
dash | 26 noclobber on stdout: 0 2stderr: dash: 5: cannot create /home/andy/git/oilshell/oil/_tmp/spec-tmp/sh-options.test.sh/26-dash/no-clobber: File exists |
osh | 26 noclobber on [osh stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
osh_ALT | 26 noclobber on [osh_ALT stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: rm: cannot remove '/home/andy/git/oilshell/oil/_tmp/spec-tmp/sh-options.test.sh/26-osh_ALT/no-clobber': No such file or directory |
dash | 27 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
mksh | 27 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
dash | 28 SHELLOPTS is readonly stdout: status=0stderr: |
mksh | 28 SHELLOPTS is readonly stdout: status=0stderr: |
osh | 28 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' |
osh_ALT | 28 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' |
mksh | 29 set - - stdout: a b a b a b - + - --stderr: |
osh | 29 set - - stdout: a b - a b a b - - - + + - --stderr: |
osh_ALT | 29 set - - stdout: a b - a b a b - - - + + - --stderr: |
dash | 31 set without args lists variables stdout: __GLOBAL='mutated' __OTHERLOCAL='L' __mylocal='L' __var_in_parent_scope='D'stderr: |
mksh | 31 set without args lists variables stdout: __GLOBAL=mutated __var_in_parent_scope=D __OTHERLOCAL=L __mylocal=Lstderr: |
dash | 33 set without args and array variables (not in OSH) stdout: stderr: dash: 1: declare: not found dash: 2: Syntax error: "(" unexpected |
mksh | 33 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 | 33 set without args and array variables (not in OSH) stdout: stderr: |
osh_ALT | 33 set without args and array variables (not in OSH) stdout: stderr: |
dash | 34 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 | 34 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 | 34 set without args and assoc array variables (not in OSH) stdout: stderr: __assoc[a]=b ^~~~~~~~ [ stdin ]:3: fatal: Associative array keys must be strings: $x 'x' "$x" etc. |
osh_ALT | 34 set without args and assoc array variables (not in OSH) stdout: stderr: __assoc[a]=b ^~~~~~~~ [ stdin ]:3: fatal: Associative array keys must be strings: $x 'x' "$x" etc. |
dash | 35 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 | 35 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 | 36 shopt -q invalid stdout: invalidZZ=1stderr: bash: line 1: shopt: invalidZZ: invalid shell option name |
dash | 36 shopt -q invalid stdout: invalidZZ=127stderr: dash: 1: shopt: not found |
mksh | 36 shopt -q invalid stdout: invalidZZ=127stderr: mksh: <stdin>[1]: shopt: not found |
bash | 37 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 | 37 shopt -s strict:all stdout: stderr: dash: 3: Syntax error: Bad function name |
mksh | 37 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 | 38 shopt allows for backward compatibility like bash stdout: status=0stderr: dash: 3: shopt: not found dash: 8: shopt: not found |
mksh | 38 shopt allows for backward compatibility like bash stdout: status=0stderr: mksh: <stdin>[3]: shopt: not found mksh: <stdin>[8]: shopt: not found |
bash | 39 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 | 39 shopt -p validates option names stdout: status=127 status=127stderr: dash: 1: shopt: not found dash: 3: shopt: not found |
mksh | 39 shopt -p validates option names stdout: status=127 status=127stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[3]: shopt: not found |
bash | 40 shopt -p -o validates option names stdout: set +o errexit set +o nounset status=1stderr: bash: line 1: shopt: invalid: invalid option name |
dash | 40 shopt -p -o validates option names stdout: status=127stderr: dash: 1: shopt: not found |
mksh | 40 shopt -p -o validates option names stdout: status=127stderr: mksh: <stdin>[1]: shopt: not found |
bash | 41 stubbed out bash options stdout: 1 0 0 0stderr: bash: line 2: shopt: foo: invalid shell option name |
dash | 41 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 | 41 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 | 42 shopt -s nounset works in Oil, not in bash stdout: status=1 nounset offstderr: bash: line 7: shopt: nounset: invalid shell option name |
dash | 42 shopt -s nounset works in Oil, not in bash stdout: N-Istderr: |
mksh | 42 shopt -s nounset works in Oil, not in bash stdout: N-Istderr: |
bash | 43 no-ops not in shopt -p output stdout: shopt -u xpg_echo --stderr: |