Results for array.test.sh

statusoshosh-cpp
pass 6363
FAIL 55
total6868
caseoshosh-cppdescription
0pass pass nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)
1pass pass local array
2pass pass Command with with word splitting in array
3pass pass space before ( in array initialization
4pass pass array over multiple lines
5pass pass array with invalid token
6pass pass array with empty string
7pass pass Retrieve index
8pass pass Retrieve out of bounds index
9pass pass Negative index
10pass pass Negative index and sparse array
11pass pass Negative index and sparse array
12pass pass Length after unset
13pass pass Retrieve index that is a variable
14pass pass Retrieve index that is a variable without $
15pass pass Retrieve index that is a command sub
16pass pass Retrieve array indices with ${!a}
17pass pass Retrieve sparse array indices with ${!a}
18pass pass ${!a[1]} is named ref in bash
19pass pass ${!a} on array
20pass pass All elements unquoted
21pass pass All elements quoted
22pass pass $*
23pass pass "$*"
24pass pass Interpolate array into array
25pass pass Exporting array doesn't do anything, not even first element
26pass pass strict_array prevents exporting array
27pass pass Arrays can't be used as env bindings
28pass pass Set element
29pass pass Set element with var ref
30pass pass Set element with array ref
31pass pass Set array item to array
32pass pass Slice of array with [@]
33pass pass Negative slice begin
34pass pass Negative slice length
35pass pass Slice with arithmetic
36pass pass Number of elements
37pass pass Length of an element
38pass pass Iteration
39pass pass glob within array yields separate elements
40pass pass declare array and then append
41pass pass Array syntax in wrong place
42FAIL FAIL Single array with :-
detailsdetails
43pass pass Stripping a whole array unquoted
44pass pass Stripping a whole array quoted
45pass pass Multiple subscripts not allowed
46pass pass Length op, index op, then transform op is not allowed
47pass pass ${mystr[@]} and ${mystr[*]} are no-ops
48pass pass ${mystr[@]} and ${mystr[*]} disallowed with strict_array
49pass pass Create a "user" array out of the argv array
50pass pass Tilde expansion within array
51pass pass Brace Expansion within Array
52pass pass array default
53pass pass Singleton Array Copy and Assign. OSH can't index strings with ints
54pass pass declare -a / local -a is empty array
55pass pass Create sparse array
56pass pass Create sparse array implicitly
57pass pass Append sparse arrays
58pass pass Slice of sparse array with [@]
59pass pass Using an array itself as the index on LHS
60pass pass Using an array itself as the index on RHS
61pass pass a[$x$y] on LHS and RHS
62pass pass Dynamic parsing of LHS a[$code]=value
63pass pass Dynamic parsing of RHS ${a[$code]}
64FAIL FAIL test membership with test -v
detailsdetails
65FAIL FAIL test membership with [[ -v
detailsdetails
66FAIL FAIL test -v array[i] with empty string
detailsdetails
67FAIL FAIL [[ -v array[expr]] ]] does arith expression evaluation
detailsdetails
126 passed, 0 OK, 0 not implemented, 0 BUG, 5 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

osh42 Single array with :-

[osh stdout] Expected "['none', 'x', 'none']\n", got "['x', '']\n"

stdout:
['x', '']
stderr:
osh-cpp42 Single array with :-

[osh-cpp stdout] Expected "['none', 'x', 'none']\n", got "['x', '']\n"

stdout:
['x', '']
stderr:
osh64 test membership with test -v

[osh stdout] Expected 'status=0\nstatus=1\n\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1

status=1
status=1
stderr:
osh-cpp64 test membership with test -v

[osh-cpp stdout] Expected 'status=0\nstatus=1\n\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1

status=1
status=1
stderr:
osh65 test membership with [[ -v

[osh stdout] Expected 'status=0\nstatus=1\n\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1

status=1
status=1
stderr:
osh-cpp65 test membership with [[ -v

[osh-cpp stdout] Expected 'status=0\nstatus=1\n\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1

status=1
status=1
stderr:
osh66 test -v array[i] with empty string

[osh stdout] Expected 'zero=0\none=0\ntwo=1\n', got 'zero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
stderr:
osh-cpp66 test -v array[i] with empty string

[osh-cpp stdout] Expected 'zero=0\none=0\ntwo=1\n', got 'zero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
stderr:
osh67 [[ -v array[expr]] ]] does arith expression evaluation

[osh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
---
zero=1
one=1
two=1
---
zero=1
one=1
two=1
stderr:
osh-cpp67 [[ -v array[expr]] ]] does arith expression evaluation

[osh-cpp stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
---
zero=1
one=1
two=1
---
zero=1
one=1
two=1
stderr: