Results for array-sparse.test.sh

statusoshosh-cpp
pass 3735
FAIL 35
total4040
caseoshosh-cppdescription
0FAIL FAIL Performance demo
detailsdetails
1pass pass test length
2pass pass test "declare -p sp"
3pass pass +=
4pass pass a[i]=v
5pass pass Negative index with a[i]=v
6pass FAIL a[i]=v with BigInt
details
7pass pass Negative out-of-bound index with a[i]=v (1/2)
8pass pass Negative out-of-bound index with a[i]=v (2/2)
9pass pass xtrace a+=()
10pass pass unset -v a[i]
11pass pass unset -v a[i] with out-of-bound negative index
12pass pass unset -v a[i] for max index
13pass pass [[ -v a[i] ]]
14pass pass [[ -v a[i] ]] with invalid negative index
15pass pass ((sp[i])) and ((sp[i]++))
16pass pass ((sp[i])) and ((sp[i]++)) with invalid negative index
17pass pass ${sp[i]}
18pass pass ${sp[i]} with negative invalid index
19pass pass ${a[@]:offset:length}
20pass pass ${@:offset:length}
21pass FAIL ${a[@]:BigInt}
details
22pass pass ${a[@]}
23pass pass ${a[@]#...}
24pass pass ${a[@]/pat/rep}
25pass pass ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}
26pass pass ${a[@]-unset}, ${a[@]:-empty}, etc.
27pass pass ${a-}
28pass pass ${!a[0]}
29pass pass ${!a[@]}
30pass pass "${a[*]}"
31pass pass compgen -F _set_COMPREPLY
32pass pass compadjust
33pass pass (YSH) @[sp] and @sp
34FAIL FAIL (YSH) $[a1 === a2]
detailsdetails
35pass pass (YSH) append v1 v2... (a)
36FAIL FAIL (YSH) $[bool(a)]
detailsdetails
37pass pass crash dump
38pass pass Regression: a[-1]=1
39pass pass Initializing indexed array with ([index]=value)
72 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh0 Performance demo

[osh stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  echo $[type(sp)]
             ^
[ stdin ]:8: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh-cpp0 Performance demo

[osh-cpp stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $[type(sp)]
             ^
[ stdin ]:8: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh-cpp6 a[i]=v with BigInt

[osh-cpp stdout] Expected '3\n4\n5\n6\n' Got '3\n3\n4\n5\n'

stdout:
3
3
4
5
stderr:
osh-cpp21 ${a[@]:BigInt}

[osh-cpp stdout] Expected '[x][x]\n[y x][y x]\n[z y x][z y x]\n[z y x][z y x]\n' Got '[x][x]\n[y x][y x]\n[z y x][z y x]\n[][]\n'

stdout:
[x][x]
[y x][y x]
[z y x][z y x]
[][]
stderr:
osh34 (YSH) $[a1 === a2]

[osh stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  echo $[a1 === a1]
              ^
[ stdin ]:11: Token can't be used in prefix position
osh-cpp34 (YSH) $[a1 === a2]

[osh-cpp stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $[a1 === a1]
              ^
[ stdin ]:11: Token can't be used in prefix position
osh36 (YSH) $[bool(a)]

[osh stdout] Expected 'false\ntrue\ntrue\ntrue\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  echo $[bool(a1)]
             ^
[ stdin ]:9: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh-cpp36 (YSH) $[bool(a)]

[osh-cpp stdout] Expected 'false\ntrue\ntrue\ntrue\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $[bool(a1)]
             ^
[ stdin ]:9: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)