Results for array.test.sh

statusoshosh_.pyosh_.cc
pass 656561
ok 111
FAIL 004
total666666
caseoshosh_.pyosh_.ccdescription
0pass pass pass SETUP
1pass pass pass "${a[@]}" and "${a[*]}"
2pass pass pass ${a[@]} and ${a[*]}
3pass pass pass 4 ways to interpolate empty array
4pass pass pass empty array
5pass pass pass Empty array with :-
6pass pass pass nounset with empty array (design bug, makes it hard to use arrays)
7pass pass pass local array
8pass pass FAIL Command with with word splitting in array
details
9pass pass pass space before ( in array initialization
10pass pass pass array over multiple lines
11pass pass pass array with invalid token
12pass pass pass array with empty string
13pass pass pass Retrieve index
14pass pass pass Retrieve out of bounds index
15pass pass pass Negative index
16pass pass pass Negative index and sparse array
17pass pass pass Negative index and sparse array
18pass pass pass Length after unset
19pass pass pass Retrieve index that is a variable
20pass pass pass Retrieve index that is a variable without $
21pass pass FAIL Retrieve index that is a command sub
details
22pass pass pass Retrieve array indices with ${!a}
23pass pass pass Retrieve sparse array indices with ${!a}
24pass pass pass ${!a[1]} is named ref in bash
25pass pass pass ${!a} on array is disallowed
26pass pass pass All elements unquoted
27pass pass pass All elements quoted
28pass pass pass $*
29pass pass pass "$*"
30pass pass pass Interpolate array into array
31pass pass pass Exporting array doesn't do anything, not even first element
32pass pass pass Arrays can't be used as env bindings
33pass pass pass Set element
34pass pass pass Set element with var ref
35pass pass pass Set element with array ref
36pass pass pass Set array item to array
37pass pass pass Slice of array with [@]
38pass pass pass Negative slice begin
39pass pass pass Negative slice length
40pass pass pass Slice with arithmetic
41pass pass pass Number of elements
42pass pass pass Length of an element
43pass pass pass Iteration
44pass pass pass glob within array yields separate elements
45pass pass pass declare array and then append
46pass pass pass Array syntax in wrong place
47ok ok ok Single array with :-
detailsdetailsdetails
48pass pass pass Stripping a whole array unquoted
49pass pass pass Stripping a whole array quoted
50pass pass pass Multiple subscripts not allowed
51pass pass pass Length op, index op, then transform op is not allowed
52pass pass pass Array subscript not allowed on string
53pass pass pass Create a "user" array out of the argv array
54pass pass pass Tilde expansion within array
55pass pass pass Brace Expansion within Array
56pass pass pass array default
57pass pass pass Singleton Array Copy and Assign. OSH can't index strings with ints
58pass pass pass declare -a / local -a is empty array
59pass pass FAIL Create sparse array
details
60pass pass FAIL Create sparse array implicitly
details
61pass pass pass Append sparse arrays
62pass pass pass Slice of sparse array with [@]
63pass pass pass Using an array itself as the index on LHS
64pass pass pass Using an array itself as the index on RHS
65pass pass pass a[$x$y] on LHS and RHS
191 passed, 3 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc8 Command with with word splitting in array

[osh_.cc stdout] Expected "['1 2', '3', '4']\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_.cc21 Retrieve index that is a command sub

[osh_.cc stdout] Expected "['2 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.
osh47 Single array with :-

stdout:
['x', '']
stderr:
osh_.py47 Single array with :-

stdout:
['x', '']
stderr:
osh_.cc47 Single array with :-

stdout:
['x', '']
stderr:
dumb_alloc:
	gNumNew = 1857
	gNumDelete = 135
	gMemPos = 64448

	gNumMalloc = 88
	gNumFree = 0
	gMemPos2 = 10592
osh_.cc59 Create sparse array

[osh_.cc stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "['1']\nlen=1\nunset=\nlen-of-unset=0\n"

stdout:
['1']
len=1
unset=
len-of-unset=0
stderr:
dumb_alloc:
	gNumNew = 2262
	gNumDelete = 214
	gMemPos = 78448

	gNumMalloc = 228
	gNumFree = 0
	gMemPos2 = 12848
osh_.cc60 Create sparse array implicitly

[osh_.cc stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "['1']\nlen=1\nunset=\nlen-of-unset=0\n"

stdout:
['1']
len=1
unset=
len-of-unset=0
stderr:
dumb_alloc:
	gNumNew = 2224
	gNumDelete = 204
	gMemPos = 77040

	gNumMalloc = 224
	gNumFree = 0
	gMemPos2 = 12784