Results for ysh-expr-compare.test.sh

statusosh
pass 15
FAIL 2
total17
caseoshdescription
0pass Exact equality with === and !==
1pass Approximate equality of Str x {Str, Int, Bool} with ~==
2pass Wrong Types with ~==
3pass === on float not allowed
4pass floatsEqual()
5FAIL Comparison converts from Str -> Int or Float
details
6pass Comparison of Int
7pass Comparison of Str does conversion to Int
8pass Mixed Type Comparison does conversion to Int
9FAIL Invalid String is an error
details
10pass Bool conversion -- explicit allowed, implicit not allowed
11pass Chained Comparisons
12pass List / "Tuple" comparison is not allowed
13pass Ternary op behaves like if statement
14pass Undefined comparisons
15pass Non-comparable types in case arms
16pass object identity
15 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh5 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 1\nsi i 1\n i si 1\n---\n'
[osh status] Expected 0 Got 2

stdout:
 i  i 1
si  i 1
 i si 1
---
stderr:
  echo ' f  f' $[2.5 > 1.5]
                  ^
[ stdin ]:6: Unexpected token while parsing arithmetic: '.'
osh9 Invalid String is an error

[osh stdout] Expected '' Got 'code=3\n(Bool) true\ncode=0\n'
[osh status] Expected 3 Got 0

stdout:
code=3
(Bool)  true
code=0
stderr: