spec test index / oilshell.org
status | osh | |
pass | 12 | |
FAIL | 5 | |
total | 17 | |
case | osh | description |
0 | pass | Exact equality with === and !== |
1 | FAIL | Approximate equality of Str x {Str, Int, Bool} with ~== |
details | ||
2 | pass | Wrong Types with ~== |
3 | pass | === on float not allowed |
4 | pass | floatsEqual() |
5 | FAIL | Comparison converts from Str -> Int or Float |
details | ||
6 | pass | Comparison of Int |
7 | FAIL | Comparison of Str does conversion to Int |
details | ||
8 | FAIL | Mixed Type Comparison does conversion to Int |
details | ||
9 | FAIL | Invalid String is an error |
details | ||
10 | pass | Bool conversion -- explicit allowed, implicit not allowed |
11 | pass | Chained Comparisons |
12 | pass | List / "Tuple" comparison is not allowed |
13 | pass | Ternary op behaves like if statement |
14 | pass | Undefined comparisons |
15 | pass | Non-comparable types in case arms |
16 | pass | object identity |
12 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 | 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 | 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 | 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 | 9 Invalid String is an error [osh status] Expected 3, got 1 stdout: stderr: = '3' < 'bar' ^ [ stdin ]:4: fatal: Integer too big: 3 |