Results for array-compat.test.sh

statusbashmkshosh
pass 1297
ok 003
N-I 030
FAIL 002
total121212
casebashmkshoshdescription
0pass pass pass Assignment Causes Array Decay
1pass pass pass Array Decay with IFS
2pass pass pass User arrays decay
3pass pass ok strict_array: $array is not valid in OSH, is ${array[0]} in ksh/bash
details
4pass pass ok strict_array: ${array} is not valid in OSH, is ${array[0]} in ksh/bash
details
5pass pass pass Assign to array index without initialization
6pass pass pass a[40] grows array
7pass pass pass array decays to string when comparing with [[ a = b ]]
8pass pass ok ++ on a whole array increments the first element (disallowed with strict_array)
details
9pass N-I pass Apply vectorized operations on ${a[*]}
details
10pass N-I FAIL value.BashArray internal representation - Indexed
detailsdetails
11pass N-I FAIL value.BashArray internal representation - Assoc (ordering is a problem)
detailsdetails
28 passed, 3 OK, 3 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh3 strict_array: $array is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo $a
       ^~
[ stdin ]:4: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh4 strict_array: ${array} is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo ${a}
       ^~
[ stdin ]:4: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh8 ++ on a whole array increments the first element (disallowed with strict_array)

stdout:
stderr: 
  (( a++ ))  # doesn't make sense
     ^
[ stdin ]:4: fatal: Expected a value convertible to integer, got value.BashArray
mksh9 Apply vectorized operations on ${a[*]}

stdout:
stderr: 
mksh: <stdin>[3]: ${a[*]#-}: bad substitution
mksh10 value.BashArray internal representation - Indexed

stdout:
stderr: 
osh10 value.BashArray internal representation - Indexed

[osh stdout] Expected 'declare -a z=()\ndeclare -a z=([0]="b" [1]="c")\ndeclare -a z=([0]="b" [1]="c" [5]="d")\ndeclare -a z=([0]="b" [1]="ZZZ" [5]="d")\ndeclare -a z=([0]="b" [1]="ZZZ" [5]="d" [6]="f" [7]="g")\ndeclare -a z=([0]="b-mystr" [1]="ZZZ" [5]="d" [6]="f" [7]="g")\ndeclare -a z=([0]="b-mystr" [1]="ZZZ-append" [5]="d" [6]="f" [7]="g")\n[\'keys\', \'0\', \'1\', \'5\', \'6\', \'7\']\n[\'values\', \'b-mystr\', \'ZZZ-append\', \'d\', \'f\', \'g\']\nstatus=1\n' Got 'z=()\nz=(b c)\nz=(); z[0]=b z[1]=c z[5]=d\nz=(); z[0]=b z[1]=ZZZ z[5]=d\nz=(); z[0]=b z[1]=ZZZ z[5]=d z[6]=f z[7]=g\n'
[osh status] Expected 0, got 1

stdout:
z=()
z=(b c)
z=(); z[0]=b z[1]=c z[5]=d
z=(); z[0]=b z[1]=ZZZ z[5]=d
z=(); z[0]=b z[1]=ZZZ z[5]=d z[6]=f z[7]=g
stderr:
  z+=-mystr
  ^~~
[ stdin ]:18: fatal: Can't append string to array
mksh11 value.BashArray internal representation - Assoc (ordering is a problem)

stdout:
stderr: 
osh11 value.BashArray internal representation - Assoc (ordering is a problem)

[osh stdout] Expected 'declare -A A=([k]="v" )\n[\'keys\', \'k\']\n[\'values\', \'v\']\n' Got "A=(['k']=v)\n['keys', 'k']\n['values', 'v']\n"

stdout:
A=(['k']=v)
['keys', 'k']
['values', 'v']
stderr: