Results for ysh-expr-arith.test.sh

statusosh
pass 28
FAIL 2
total30
caseoshdescription
0pass Minus operator is left associative
1pass Division operators are left associative
2pass Exponentiation is right associative
3FAIL Binary operators, with conversions from string
details
4pass Floating Point Division with /
5pass Operations That Convert to Integer: // % **
6pass Division by zero
7pass Unary Operations
8pass Unary plus on integers and floats
9pass unary plus and minus combined
10pass unary minus on strings
11pass unary plus on strings
12pass unary ~ complement on strings
13pass unary ~ doesn't work on bool
14pass unary ~ doesn't work on float
15pass unary - applied to bool is not allowed
16pass Big float constants becomes inf and -inf, tiny become 0.0 and -0.0
17pass Int constants bigger than 64 bits
18pass Bit shift by negative number is not allowed
19pass 64-bit operations
20pass 64-bit integer doesn't overflow
21pass Integer literals
22pass Integer literals with underscores
23pass Exponentiation with **
24pass Float Division
25pass Integer Division (rounds toward zero)
26pass % operator is remainder
27pass Bitwise logical
28pass Shift operators
29FAIL multiline strings, list, tuple syntax for list, etc.
details
28 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

osh3 Binary operators, with conversions from string

[osh stdout] Expected ' i i 3\nsi i 3\n i si 3\n---\n f f 1.0\nsf f 1.0\n f sf 1.0\n---\n i f 6.0\nsi f 6.0\n i sf 6.0\n---\n f i 2.5\nsf i 2.5\n f si 2.5\n' Got ' i i 3\nsi i 3\n i si 3\n---\n'
[osh status] Expected 0 Got 2

stdout:
 i  i 3
si  i 3
 i si 3
---
stderr:
  echo ' f  f' $[2.5 - 1.5]
                  ^
[ stdin ]:6: Unexpected token while parsing arithmetic: '.'
osh29 multiline strings, list, tuple syntax for list, etc.

[osh stdout] Expected 'dq=6\nsq=6\nmylist=3\nmytuple=3\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  echo dq=$[len(dq)]
               ^
[ stdin ]:5: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)