Results for arith.test.sh

statusoshosh-cpp
pass 5958
ok 33
FAIL 01
total6262
caseoshosh-cppdescription
0pass pass Side Effect in Array Indexing
1pass pass Add one to var
2pass pass $ is optional
3pass pass SimpleVarSub within arith
4pass pass BracedVarSub within ArithSub
5pass pass Arith word part
6pass pass Arith sub with word parts
7pass pass Constant with quotes like '1'
8pass pass Arith sub within arith sub
9pass pass Backticks within arith sub
10ok ok Invalid string to int
detailsdetails
11pass pass Invalid string to int with strict_arith
12pass pass Newline in the middle of expression
13pass pass Ternary operator
14pass pass Preincrement
15pass pass Postincrement
16pass pass Increment undefined variables
17pass pass Increment and decrement array elements
18pass pass Increment undefined variables with nounset
19pass pass Comma operator (borrowed from C)
20pass pass Augmented assignment
21pass pass Comparison Ops
22pass pass Logical Ops
23pass pass Logical Ops Short Circuit
24pass pass Bitwise ops
25pass pass Unary minus and plus
26pass pass No floating point
27pass pass Array indexing in arith
28pass pass Constants in base 36
29pass pass Constants in bases 2 to 64
30pass pass Multiple digit constants with base N
31pass pass Dynamic base constants
32pass pass Octal constant
33pass pass Dynamic octal constant
34pass pass Dynamic hex constants
35pass pass Dynamic var names - result of runtime parse/eval
36pass pass Recursive name evaluation is a result of runtime parse/eval
37pass pass nounset with arithmetic
38pass FAIL Integer Overflow
details
39pass pass Invalid LValue
40pass pass Invalid LValue that looks like array
41pass pass Invalid LValue: two sets of brackets
42pass pass Operator Precedence
43pass pass Exponentiation with **
44pass pass Exponentiation operator has buggy precedence
45pass pass Negative exponent
46ok ok Comment not allowed in the middle of multiline arithmetic
detailsdetails
47pass pass Can't add integer to indexed array
48pass pass Can't add integer to associative array
49ok ok Double subscript
detailsdetails
50pass pass result of ArithSub is array
51pass pass result of ArithSub is assoc array
52pass pass comma operator
53pass pass assignment with dynamic var name
54pass pass array assignment with dynamic array name
55pass pass unary assignment with dynamic var name
56pass pass unary array assignment with dynamic var name
57pass pass Dynamic parsing of arithmetic
58pass pass Dynamic parsing on empty string
59pass pass nested ternary (bug fix)
60pass pass 1 ? a=1 : b=2 ( bug fix)
61pass pass Invalid constant
117 passed, 6 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh10 Invalid string to int

stdout:
5
stderr:
osh-cpp10 Invalid string to int

stdout:
5
stderr:
osh-cpp38 Integer Overflow

[osh-cpp stdout] Expected '999996000005999996000001\n', got '-15640831\n'

stdout:
-15640831
stderr:
osh46 Comment not allowed in the middle of multiline arithmetic

stdout:
6
stderr:
  1 + 2  # not a comment
         ^
[ stdin ]:7: Unexpected token after arithmetic expression (Id.Word_Compound != Id.Arith_RParen)
osh-cpp46 Comment not allowed in the middle of multiline arithmetic

stdout:
6
stderr:
  1 + 2  # not a comment
         ^
[ stdin ]:7: Unexpected token after arithmetic expression (Id.Word_Compound != Id.Arith_RParen)
osh49 Double subscript

stdout:
2
stderr:
  echo $(( a[1][1] ))
               ^
[ stdin ]:3: The [ operator doesn't apply to this expression
osh-cpp49 Double subscript

stdout:
2
stderr:
  echo $(( a[1][1] ))
               ^
[ stdin ]:3: The [ operator doesn't apply to this expression