spec test index / oilshell.org
status | osh | |
pass | 15 | |
FAIL | 1 | |
total | 16 | |
case | osh | description |
0 | pass | Exact equality with === and !== |
1 | pass | Approximate equality of Str x {Str, Int, Bool} with ~== |
2 | pass | Wrong Types with ~== |
3 | pass | === on float not allowed |
4 | FAIL | ~== on Float - TODO floatEquals() |
details | ||
5 | pass | Comparison converts from Str -> Int or Float |
6 | pass | Comparison of Int |
7 | pass | Comparison of Str does conversion to Int |
8 | pass | Mixed Type Comparison does conversion to Int |
9 | pass | Invalid String is an error |
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 |
15 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
osh | 4 ~== on Float - TODO floatEquals() [osh status] Expected 0, got 1 stdout: stderr: if (42 ~== 42.0) { ^~~ [ stdin ]:3: fatal: ~== expects a string on the left |