spec test index / oilshell.org
status | dash | bash | mksh | osh | |
pass | 38 | 44 | 42 | 45 | |
ok | 3 | 1 | 2 | 0 | |
N-I | 4 | 0 | 1 | 0 | |
BUG | 1 | 1 | 1 | 0 | |
FAIL | 0 | 0 | 0 | 1 | |
total | 46 | 46 | 46 | 46 | |
case | dash | bash | mksh | osh | description |
0 | pass | pass | pass | pass | zero args: [ ] |
1 | pass | pass | pass | pass | one arg: [ x ] where x is one of '=' '!' '(' ']' |
2 | pass | pass | pass | pass | one arg: empty string is false. Equivalent to -n. |
3 | N-I | pass | pass | pass | -a as unary operator (alias of -e) |
details | |||||
4 | pass | pass | pass | pass | two args: -z with = ! ( ] |
5 | pass | pass | pass | pass | three args |
6 | pass | pass | pass | pass | four args |
7 | pass | pass | pass | pass | test with extra args is syntax error |
8 | pass | pass | pass | pass | ] syntax errors |
9 | pass | pass | pass | pass | -n |
10 | pass | pass | pass | pass | ! -a |
11 | pass | pass | pass | pass | -o |
12 | pass | pass | pass | pass | ( ) |
13 | pass | pass | pass | pass | ( ) ! -a -o with system version of [ |
14 | BUG | pass | pass | pass | == is alias for = |
details | |||||
15 | N-I | pass | pass | pass | == and = does not do glob |
details | |||||
16 | pass | pass | pass | pass | [ with op variable |
17 | pass | pass | pass | pass | [ with unquoted empty var |
18 | pass | pass | pass | pass | [ compare with literal -f |
19 | pass | pass | pass | pass | [ '(' foo ] is runtime syntax error |
20 | pass | pass | pass | pass | -z '>' implies two token lookahead |
21 | ok | pass | ok | pass | operator/operand ambiguity with ] |
details | details | ||||
22 | ok | pass | ok | pass | operator/operand ambiguity with -a |
details | details | ||||
23 | pass | pass | pass | pass | -d |
24 | pass | pass | pass | pass | -x |
25 | pass | pass | pass | pass | -r |
26 | pass | pass | pass | pass | -w |
27 | pass | pass | pass | pass | -k for sticky bit |
28 | pass | pass | pass | pass | -h and -L test for symlink |
29 | pass | pass | pass | pass | -t 1 for stdout |
30 | pass | BUG | pass | pass | [ -t invalid ] |
details | |||||
31 | pass | pass | pass | pass | -ot and -nt |
32 | pass | pass | BUG | FAIL | [ a -eq b ] |
details | details | ||||
33 | pass | pass | pass | pass | test -s |
34 | pass | pass | pass | pass | test -b -c -S (block, character, socket) |
35 | pass | pass | pass | pass | test -p named pipe |
36 | pass | pass | pass | pass | -G and -O for effective user ID and group ID |
37 | pass | pass | pass | pass | -u for setuid, -g too |
38 | N-I | pass | N-I | pass | -v to test variable (bash) |
details | details | ||||
39 | N-I | pass | pass | pass | test -o for options |
details | |||||
40 | pass | pass | pass | pass | -nt -ot |
41 | pass | pass | pass | pass | -ef |
42 | ok | ok | pass | pass | Overflow error |
details | details | ||||
43 | pass | pass | pass | pass | Bug regression |
44 | pass | pass | pass | pass | test -c |
45 | pass | pass | pass | pass | test -S |
169 passed, 6 OK, 5 not implemented, 3 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
dash | 3 -a as unary operator (alias of -e) stdout: status=2 status=2stderr: dash: 1: [: -a: unexpected operator dash: 3: [: -a: unexpected operator |
dash | 14 == is alias for = stdout: truestderr: dash: 2: [: a: unexpected operator |
dash | 15 == and = does not do glob stdout: status=1 status=2stderr: dash: 3: [: abc: unexpected operator |
dash | 21 operator/operand ambiguity with ] stdout: status=2stderr: dash: 1: [: -a: unexpected operator |
mksh | 21 operator/operand ambiguity with ] stdout: status=2stderr: mksh: <stdin>[1]: [: ]: unexpected operator/operand |
dash | 22 operator/operand ambiguity with -a stdout: status=1stderr: |
mksh | 22 operator/operand ambiguity with -a stdout: status=2stderr: mksh: <stdin>[1]: [: expression expected |
bash | 30 [ -t invalid ] stdout: status=1stderr: |
mksh | 32 [ a -eq b ] stdout: status=0stderr: |
osh | 32 [ a -eq b ] [osh stdout] Expected 'status=2\n', got '' [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1171, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2036, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1835, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1570, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 840, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/bracket_osh.py", line 271, in Run b = bool_ev.EvalB(bool_node) File "/home/uke/oil/osh/sh_expr_eval.py", line 1137, in EvalB i1 = self._StringToBigIntOrError(s1, blame_word=node.left) File "/home/uke/oil/osh/sh_expr_eval.py", line 1029, in _StringToBigIntOrError i = self._StringToBigInt(s, location) File "/home/uke/oil/osh/sh_expr_eval.py", line 395, in _StringToBigInt assert self.parse_ctx is not None AssertionError |
dash | 38 -v to test variable (bash) stdout: global=2 global=2 dynamic=2 dynamic=2 dynamic=2stderr: dash: 1: test: -v: unexpected operator dash: 5: test: -v: unexpected operator dash: 14: test: -v: unexpected operator dash: 16: test: -v: unexpected operator dash: 18: test: -v: unexpected operator |
mksh | 38 -v to test variable (bash) stdout: global=2 global=2 dynamic=2 dynamic=2 dynamic=2stderr: mksh: <stdin>[1]: test: nonexistent: unexpected operator/operand mksh: <stdin>[5]: test: g: unexpected operator/operand mksh: <stdin>[21]: test: f_var: unexpected operator/operand mksh: <stdin>[21]: test: g: unexpected operator/operand mksh: <stdin>[21]: test: nonexistent: unexpected operator/operand |
dash | 39 test -o for options stdout: status=2 status=2 status=2stderr: dash: 1: test: -o: unexpected operator dash: 5: test: -o: unexpected operator dash: 8: test: -o: unexpected operator |
dash | 42 Overflow error stdout: status=1stderr: |
bash | 42 Overflow error stdout: status=1stderr: |