spec test index / oilshell.org
166 passed, 11 OK, 17 not implemented, 7 BUG, 3 failed, 0 timeouts, 0 cases skipped 3 failed under osh
mksh | 0 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 | 1 local array stdout: stderr: mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 3 space before ( in array initialization stdout: 1stderr: |
mksh | 5 array with invalid token stdout: stderr: mksh: <stdin>[3]: syntax error: '&' unexpected |
mksh | 9 Negative index stdout: ['', '', '']stderr: |
mksh | 10 Negative index and sparse array stdout: 0 2 3 -1 -2 -3 -4 -5 0 2 3 0 0 2 3 42stderr: |
mksh | 11 Negative index and sparse array stdout: 0 0 1 1 2 2 3 3stderr: |
mksh | 12 Length after unset stdout: len=4 len=4stderr: |
mksh | 18 ${!a[1]} is named ref in bash stdout: ['a[1]']stderr: |
mksh | 19 ${!a} on array stdout: ['a']stderr: |
bash | 26 strict_array prevents exporting array stdout: Nonestderr: bash: line 1: shopt: strict_array: invalid shell option name |
mksh | 26 strict_array prevents exporting array stdout: Nonestderr: mksh: <stdin>[1]: shopt: not found |
bash | 27 Arrays can't be used as env bindings stdout: a (b b)stderr: |
mksh | 27 Arrays can't be used as env bindings stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
bash | 31 Set array item to array stdout: status=1stderr: bash: line 2: a[0]: cannot assign list to array member |
mksh | 31 Set array item to array stdout: stderr: mksh: <stdin>[2]: set: a[0]: is not an identifier |
mksh | 32 Slice of array with [@] stdout: stderr: mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
mksh | 33 Negative slice begin stdout: stderr: mksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution |
mksh | 35 Slice with arithmetic stdout: stderr: mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution |
bash | 41 Array syntax in wrong place stdout: stderr: bash: line 1: syntax error near unexpected token `(' bash: line 1: `ls foo=(1 2)' |
osh | 42 Single array with :- [osh stdout] Expected "['none', 'x', 'none']\n", got "['x', '']\n" stdout: ['x', '']stderr: |
mksh | 43 Stripping a whole array unquoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
mksh | 44 Stripping a whole array quoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
bash | 45 Multiple subscripts not allowed stdout: stderr: bash: line 2: ${a[0][0]}: bad substitution |
mksh | 45 Multiple subscripts not allowed stdout: stderr: mksh: <stdin>[2]: ${a[0][0]}: bad substitution |
bash | 46 Length op, index op, then transform op is not allowed stdout: stderr: bash: line 2: ${#a[0]/1/xxx}: bad substitution |
mksh | 46 Length op, index op, then transform op is not allowed stdout: stderr: mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
bash | 48 ${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 | 48 ${mystr[@]} and ${mystr[*]} disallowed with strict_array stdout: abc status=0 abc status=0stderr: mksh: shopt: not found mksh: shopt: not found |
bash | 53 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 53 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 58 Slice of sparse array with [@] stdout: stderr: mksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution |
mksh | 64 Is element set? test -v a[i] stdout: set=2 empty=2 unset=2stderr: mksh: <stdin>[3]: test: array[1]: unexpected operator/operand mksh: <stdin>[6]: test: array[3]: unexpected operator/operand mksh: <stdin>[9]: test: array[4]: unexpected operator/operand |
mksh | 65 [[ -v a[i] ]] stdout: stderr: mksh: <stdin>[2]: syntax error: 'array[1]' unexpected operator/operand |
mksh | 66 test -v a[i] with arith expressions stdout: status=2 status=2 dbracketstderr: mksh: <stdin>[3]: test: array[1+1]: unexpected operator/operand mksh: <stdin>[6]: test: array[4+1]: unexpected operator/operand mksh: <stdin>[12]: syntax error: 'array[1+1]' unexpected operator/operand |
osh | 66 test -v a[i] with arith expressions [osh stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=1\nstatus=1\n\ndbracket\nstatus=1\nstatus=1\n' stdout: status=1 status=1 dbracket status=1 status=1stderr: |
mksh | 67 More arith expressions in [[ -v array[expr]] ]] stdout: stderr: mksh: <stdin>[6]: syntax error: 'array[zero+0]' unexpected operator/operand |
osh | 67 More arith expressions in [[ -v array[expr]] ]] [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=1stderr: |