Results for arith.test.sh

statusoshosh_.pyosh_.cc
pass 575753
ok 555
FAIL 004
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 FAIL Arith sub with word parts
details
7pass pass pass Constant with quotes like '1'
8pass pass pass Arith sub within arith sub
9pass pass FAIL Backticks within arith sub
details
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 FAIL Invalid constant
details
167 passed, 15 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc6 Arith sub with word parts

[osh_.cc stdout] Expected '14\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc9 Backticks within arith sub

[osh_.cc stdout] Expected '3\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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:
dumb_alloc:
	gNumNew = 1999
	gNumDelete = 158
	gMemPos = 68096

	gNumMalloc = 142
	gNumFree = 0
	gMemPos2 = 10688
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:
dumb_alloc:
	gNumNew = 1816
	gNumDelete = 127
	gMemPos = 62656

	gNumMalloc = 72
	gNumFree = 0
	gMemPos2 = 9552
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:
dumb_alloc:
	gNumNew = 2003
	gNumDelete = 155
	gMemPos = 68000

	gNumMalloc = 114
	gNumFree = 0
	gMemPos2 = 10224
osh_.cc38 Integer Overflow

[osh_.cc stdout] Expected '999996000005999996000001\n', got '-15640831\n'

stdout:
-15640831
stderr:
dumb_alloc:
	gNumNew = 1966
	gNumDelete = 149
	gMemPos = 67696

	gNumMalloc = 146
	gNumFree = 0
	gMemPos2 = 10736
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)

dumb_alloc:
	gNumNew = 1791
	gNumDelete = 122
	gMemPos = 62336

	gNumMalloc = 75
	gNumFree = 0
	gMemPos2 = 9616
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

dumb_alloc:
	gNumNew = 1889
	gNumDelete = 134
	gMemPos = 64544

	gNumMalloc = 108
	gNumFree = 0
	gMemPos2 = 10144
osh_.cc61 Invalid constant

[osh_.cc stdout] Expected '0\nstatus=0\nstatus=1\n', got ''
[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed.