Results for ysh-expr-compare.test.sh

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

Details on runs that didn't PASS

osh1 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-Str
stderr:
  if ('3 ' ~== 3) {
           ^~~
[ stdin ]:11: fatal: Integer too big
osh_ALT1 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-Str
stderr:
  if ('3 ' ~== 3) {
           ^~~
[ stdin ]:11: fatal: Integer too big
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 true\n'
[osh status] Expected 0, got 1

stdout:
 i  i true
stderr:
  echo 'si  i' $['1' < 2]
               ^~
[ stdin ]:2: fatal: Integer too big: 1
osh_ALT5 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 true
stderr:
  echo 'si  i' $['1' < 2]
               ^~
[ stdin ]:2: fatal: Integer too big: 1
osh7 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_ALT7 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
osh8 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_ALT8 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
osh9 Invalid String is an error

[osh status] Expected 3, got 1

stdout:
stderr: 
    = '3' < 'bar'
    ^
[ stdin ]:4: fatal: Integer too big: 3
osh_ALT9 Invalid String is an error

[osh_ALT status] Expected 3, got 1

stdout:
stderr: 
    = '3' < 'bar'
    ^
[ stdin ]:4: fatal: Integer too big: 3