spec test index / oilshell.org
status | osh | osh-cpp | |
pass | 7 | 7 | |
ok | 3 | 3 | |
FAIL | 2 | 2 | |
total | 12 | 12 | |
case | osh | osh-cpp | description |
0 | pass | pass | Assignment Causes Array Decay |
1 | pass | pass | Array Decay with IFS |
2 | pass | pass | User arrays decay |
3 | ok | ok | strict_array: $array is not valid in OSH, is ${array[0]} in ksh/bash |
details | details | ||
4 | ok | ok | strict_array: ${array} is not valid in OSH, is ${array[0]} in ksh/bash |
details | details | ||
5 | pass | pass | Assign to array index without initialization |
6 | pass | pass | a[40] grows array |
7 | pass | pass | array decays to string when comparing with [[ a = b ]] |
8 | ok | ok | ++ on a whole array increments the first element (disallowed with strict_array) |
details | details | ||
9 | pass | pass | Apply vectorized operations on ${a[*]} |
10 | FAIL | FAIL | value.BashArray internal representation - Indexed |
details | details | ||
11 | FAIL | FAIL | value.BashArray internal representation - Assoc (ordering is a problem) |
details | details |
14 passed, 6 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped 2 failed under osh
osh | 3 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 *) |
osh-cpp | 3 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 *) |
osh | 4 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 *) |
osh-cpp | 4 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 *) |
osh | 8 ++ 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 BashArray |
osh-cpp | 8 ++ 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 BashArray |
osh | 10 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]=gstderr: z+=-mystr ^~~ [ stdin ]:18: fatal: Can't append string to array |
osh-cpp | 10 value.BashArray internal representation - Indexed [osh-cpp 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-cpp 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]=gstderr: z+=-mystr ^~~ [ stdin ]:18: fatal: Can't append string to array |
osh | 11 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: |
osh-cpp | 11 value.BashArray internal representation - Assoc (ordering is a problem) [osh-cpp 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: |