spec test index / oilshell.org
status | osh | osh_ALT | |
pass | 12 | 12 | |
FAIL | 5 | 5 | |
total | 17 | 17 | |
case | osh | osh_ALT | description |
0 | pass | pass | Exact equality with === and !== |
1 | FAIL | FAIL | Approximate equality of Str x {Str, Int, Bool} with ~== |
details | details | ||
2 | pass | pass | Wrong Types with ~== |
3 | pass | pass | === on float not allowed |
4 | pass | pass | floatsEqual() |
5 | FAIL | FAIL | Comparison converts from Str -> Int or Float |
details | details | ||
6 | pass | pass | Comparison of Int |
7 | FAIL | FAIL | Comparison of Str does conversion to Int |
details | details | ||
8 | FAIL | FAIL | Mixed Type Comparison does conversion to Int |
details | details | ||
9 | FAIL | FAIL | Invalid String is an error |
details | details | ||
10 | pass | pass | Bool conversion -- explicit allowed, implicit not allowed |
11 | pass | pass | Chained Comparisons |
12 | pass | pass | List / "Tuple" comparison is not allowed |
13 | pass | pass | Ternary op behaves like if statement |
14 | pass | pass | Undefined comparisons |
15 | pass | pass | Non-comparable types in case arms |
16 | pass | pass | object identity |
24 passed, 0 OK, 0 not implemented, 0 BUG, 5 failed, 0 timeouts, 0 cases skipped 5 failed under osh
osh | 1 Approximate equality of Str x {Str, Int, Bool} with ~== [osh stdout] Expected 'Str-Str\nStr-Int\nStr-Negative\nStr-Underscore\nStr-Bool\nbool matrix\n' Got 'Str-Str\n' [osh status] Expected 0, got 1 stdout: Str-Strstderr: if ('3 ' ~== 3) { ^~~ [ stdin ]:11: fatal: Integer too big |
osh_ALT | 1 Approximate equality of Str x {Str, Int, Bool} with ~== [osh_ALT stdout] Expected 'Str-Str\nStr-Int\nStr-Negative\nStr-Underscore\nStr-Bool\nbool matrix\n' Got 'Str-Str\n' [osh_ALT status] Expected 0, got 1 stdout: Str-Strstderr: if ('3 ' ~== 3) { ^~~ [ stdin ]:11: fatal: Integer too big |
osh | 5 Comparison converts from Str -> Int or Float [osh stdout] Expected ' i i true\nsi i true\n i si true\n---\n f f true\nsf f true\n f sf true\n---\n i f false\nsi f false\n i sf false\n---\n f i true\nsf i true\n f si true\n' Got ' i i true\n' [osh status] Expected 0, got 1 stdout: i i truestderr: echo 'si i' $['1' < 2] ^~ [ stdin ]:2: fatal: Integer too big: 1 |
osh_ALT | 5 Comparison converts from Str -> Int or Float [osh_ALT stdout] Expected ' i i true\nsi i true\n i si true\n---\n f f true\nsf f true\n f sf true\n---\n i f false\nsi f false\n i sf false\n---\n f i true\nsf i true\n f si true\n' Got ' i i true\n' [osh_ALT status] Expected 0, got 1 stdout: i i truestderr: echo 'si i' $['1' < 2] ^~ [ stdin ]:2: fatal: Integer too big: 1 |
osh | 7 Comparison of Str does conversion to Int [osh stdout] Expected '<\n<=\n>\n>=\n', got '' [osh status] Expected 0, got 1 stdout: stderr: if ('2' < '11') { ^~ [ stdin ]:3: fatal: Integer too big: 2 |
osh_ALT | 7 Comparison of Str does conversion to Int [osh_ALT stdout] Expected '<\n<=\n>\n>=\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: if ('2' < '11') { ^~ [ stdin ]:3: fatal: Integer too big: 2 |
osh | 8 Mixed Type Comparison does conversion to Int [osh stdout] Expected '<\n<=\n>\n>=\n', got '' [osh status] Expected 0, got 1 stdout: stderr: if (2 < '11') { ^~ [ stdin ]:3: fatal: Integer too big: 11 |
osh_ALT | 8 Mixed Type Comparison does conversion to Int [osh_ALT stdout] Expected '<\n<=\n>\n>=\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: if (2 < '11') { ^~ [ stdin ]:3: fatal: Integer too big: 11 |
osh | 9 Invalid String is an error [osh status] Expected 3, got 1 stdout: stderr: = '3' < 'bar' ^ [ stdin ]:4: fatal: Integer too big: 3 |
osh_ALT | 9 Invalid String is an error [osh_ALT status] Expected 3, got 1 stdout: stderr: = '3' < 'bar' ^ [ stdin ]:4: fatal: Integer too big: 3 |