spec test index / oilshell.org
case | dash | bash | mksh | osh | osh_ALT | description |
0 | pass | pass | pass | pass | pass | zero args: [ ] |
1 | pass | pass | pass | pass | pass | one arg: [ x ] where x is one of '=' '!' '(' ']' |
2 | pass | pass | pass | pass | pass | one arg: empty string is false. Equivalent to -n. |
3 | N-I | pass | pass | N-I | N-I | -a as unary operator (alias of -e) |
details | details | details | ||||
4 | pass | pass | pass | pass | pass | two args: -z with = ! ( ] |
5 | pass | pass | pass | pass | pass | three args |
6 | pass | pass | pass | pass | pass | four args |
7 | pass | pass | pass | pass | pass | test with extra args is syntax error |
8 | pass | pass | pass | pass | pass | ] syntax errors |
9 | pass | pass | pass | pass | pass | -n |
10 | pass | pass | pass | pass | pass | ! -a -o |
11 | pass | pass | pass | pass | pass | ( ) |
12 | pass | pass | pass | FAIL | FAIL | ( ) ! -a -o with system version of [ |
details | details | |||||
13 | BUG | pass | pass | pass | pass | == is alias for = |
details | ||||||
14 | N-I | pass | pass | pass | pass | == and = does not do glob |
details | ||||||
15 | pass | pass | pass | pass | pass | [ with op variable |
16 | pass | pass | pass | pass | pass | [ with unquoted empty var |
17 | pass | pass | pass | pass | pass | [ compare with literal -f |
18 | pass | pass | pass | pass | pass | [ '(' foo ] is runtime syntax error |
19 | pass | pass | pass | pass | pass | -z '>' implies two token lookahead |
20 | ok | pass | ok | pass | pass | operator/operand ambiguity with ] |
details | details | |||||
21 | ok | pass | ok | pass | pass | operator/operand ambiguity with -a |
details | details | |||||
22 | pass | pass | pass | pass | pass | -d |
23 | pass | pass | pass | pass | pass | -x |
24 | pass | pass | pass | pass | pass | -r |
25 | pass | pass | pass | pass | pass | -w |
119 passed, 4 ok, 4 known unimplemented, 1 known bugs, 1 failed, 0 skipped
dash | 3 -a as unary operator (alias of -e) stdout: status=2 status=2stderr: /bin/dash: 1: [: -a: unexpected operator /bin/dash: 3: [: -a: unexpected operator |
osh | 3 -a as unary operator (alias of -e) stdout: status=2 status=2stderr: osh error: Expected unary operator, got '-a' osh error: Expected unary operator, got '-a' |
osh_ALT | 3 -a as unary operator (alias of -e) stdout: status=2 status=2stderr: osh error: Expected unary operator, got '-a' osh error: Expected unary operator, got '-a' |
osh | 12 ( ) ! -a -o with system version of [ [osh stdout] Expected 'true\n', got '' [osh status] Expected 0, got 127 stdout: stderr: Unexpected error in execvpe('command', ['command', '[', '--version'], ...): [Errno 2] No such file or directory Unexpected error in execvpe('command', ['command', '[', '-z', '', '-a', '(', '!', '-z', 'x', ')', ']'], ...): [Errno 2] No such file or directory |
osh_ALT | 12 ( ) ! -a -o with system version of [ [osh_ALT stdout] Expected 'true\n', got '' [osh_ALT status] Expected 0, got 127 stdout: stderr: Unexpected error in execvpe('command', ['command', '[', '--version'], ...): [Errno 2] No such file or directory Unexpected error in execvpe('command', ['command', '[', '-z', '', '-a', '(', '!', '-z', 'x', ')', ']'], ...): [Errno 2] No such file or directory |
dash | 13 == is alias for = stdout: truestderr: /bin/dash: 2: [: a: unexpected operator |
dash | 14 == and = does not do glob stdout: status=1 status=2stderr: /bin/dash: 3: [: abc: unexpected operator |
dash | 20 operator/operand ambiguity with ] stdout: status=2stderr: /bin/dash: 1: [: -a: unexpected operator |
mksh | 20 operator/operand ambiguity with ] stdout: status=2stderr: /bin/mksh: <stdin>[1]: [: ]: unexpected operator/operand |
dash | 21 operator/operand ambiguity with -a stdout: status=1stderr: |
mksh | 21 operator/operand ambiguity with -a stdout: status=2stderr: /bin/mksh: <stdin>[1]: [: expression expected |