Results for arith.test.sh

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

stdout:
5
stderr:
osh_.cc10 Invalid string to int

stdout:
5
stderr:
osh35 Dynamic var names - result of runtime parse/eval

stdout:
6
stderr:
osh_.py35 Dynamic var names - result of runtime parse/eval

stdout:
6
stderr:
osh_.cc35 Dynamic var names - result of runtime parse/eval

stdout:
6
stderr:
osh36 Bizarre recursive name evaluation - result of runtime parse/eval

stdout:
6 1 1 1
stderr:
osh_.py36 Bizarre recursive name evaluation - result of runtime parse/eval

stdout:
6 1 1 1
stderr:
osh_.cc36 Bizarre recursive name evaluation - result of runtime parse/eval

stdout:
6 1 1 1
stderr:
osh_.cc38 Integer Overflow

[osh_.cc 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_.py46 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_.cc46 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_.py49 Double subscript

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

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