spec test index / oilshell.org
178 passed, 11 OK, 13 not implemented, 7 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
mksh | 6 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4) stdout: stderr: mksh: <stdin>[3]: empty[@]: parameter not set |
mksh | 7 local array stdout: stderr: mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 9 space before ( in array initialization stdout: 1stderr: |
mksh | 11 array with invalid token stdout: stderr: mksh: <stdin>[3]: syntax error: '&' unexpected |
mksh | 15 Negative index stdout: ['', '', '']stderr: |
mksh | 16 Negative index and sparse array stdout: 0 2 3 -1 -2 -3 -4 -5 0 2 3 0 0 2 3 42stderr: |
mksh | 17 Negative index and sparse array stdout: 0 0 1 1 2 2 3 3stderr: |
mksh | 18 Length after unset stdout: len=4 len=4stderr: |
mksh | 24 ${!a[1]} is named ref in bash stdout: ['a[1]']stderr: |
mksh | 25 ${!a} on array stdout: ['a']stderr: |
bash | 32 strict_array prevents exporting array stdout: Nonestderr: bash: line 1: shopt: strict_array: invalid shell option name |
mksh | 32 strict_array prevents exporting array stdout: Nonestderr: mksh: <stdin>[1]: shopt: not found |
bash | 33 Arrays can't be used as env bindings stdout: a (b b)stderr: |
mksh | 33 Arrays can't be used as env bindings stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
bash | 37 Set array item to array stdout: status=1stderr: bash: line 2: a[0]: cannot assign list to array member |
mksh | 37 Set array item to array stdout: stderr: mksh: <stdin>[2]: set: a[0]: is not an identifier |
mksh | 38 Slice of array with [@] stdout: stderr: mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
mksh | 39 Negative slice begin stdout: stderr: mksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution |
mksh | 41 Slice with arithmetic stdout: stderr: mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution |
bash | 47 Array syntax in wrong place stdout: stderr: bash: line 1: syntax error near unexpected token `(' bash: line 1: `ls foo=(1 2)' |
osh | 48 Single array with :- [osh stdout] Expected "['none', 'x', 'none']\n", got "['x', '']\n" stdout: ['x', '']stderr: |
mksh | 49 Stripping a whole array unquoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
mksh | 50 Stripping a whole array quoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
bash | 51 Multiple subscripts not allowed stdout: stderr: bash: line 2: ${a[0][0]}: bad substitution |
mksh | 51 Multiple subscripts not allowed stdout: stderr: mksh: <stdin>[2]: ${a[0][0]}: bad substitution |
bash | 52 Length op, index op, then transform op is not allowed stdout: stderr: bash: line 2: ${#a[0]/1/xxx}: bad substitution |
mksh | 52 Length op, index op, then transform op is not allowed stdout: stderr: mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
bash | 54 ${mystr[@]} and ${mystr[*]} disallowed with strict_array stdout: abc status=0 abc status=0stderr: bash: line 1: shopt: strict_array: invalid shell option name bash: line 1: shopt: strict_array: invalid shell option name |
mksh | 54 ${mystr[@]} and ${mystr[*]} disallowed with strict_array stdout: abc status=0 abc status=0stderr: mksh: shopt: not found mksh: shopt: not found |
bash | 59 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 59 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 64 Slice of sparse array with [@] stdout: stderr: mksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution |