append () { run-file append "$@" } run-file () { local spec_name=$1; shift; sh-spec spec/$spec_name.test.sh --compare-shells --oils-bin-dir $PWD/bin "$@" }
spec test index / oilshell.org
52 passed, 7 OK, 9 not implemented, 8 BUG, 0 failed, 0 timeouts, 0 cases skipped
bash | 4 error: s+=(my array) stdout: abcstderr: |
mksh | 4 error: s+=(my array) stdout: abcstderr: |
zsh | 4 error: s+=(my array) stdout: abc d e fstderr: |
bash | 5 error: myarray+=s stdout: ['xz', 'y']stderr: |
mksh | 5 error: myarray+=s stdout: ['xz', 'y']stderr: |
zsh | 5 error: myarray+=s stdout: ['x', 'y', 'z']stderr: |
bash | 6 typeset s+=(my array) stdout: abc status=0 ['abc', 'd', 'e', 'f']stderr: |
bash | 7 error: typeset myarray+=s stdout: ['x', 'y'] ['xs', 'y']stderr: |
mksh | 7 error: typeset myarray+=s stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
bash | 8 error: append used like env prefix stdout: aastderr: |
mksh | 8 error: append used like env prefix stdout: astderr: |
zsh | 8 error: append used like env prefix stdout: aastderr: |
zsh | 9 myarray[1]+=s - Append to element stdout: ['xz', 'y']stderr: |
mksh | 10 myarray[-1]+=s - Append to last element stdout: ['1', '2 3', ' 4']stderr: |
bash | 11 Try to append list to element stdout: ['1', '2 3']stderr: bash: line 2: a[-1]: cannot assign list to array member |
mksh | 11 Try to append list to element stdout: stderr: mksh: <stdin>[2]: set: a[-1]+: is not an identifier |
zsh | 11 Try to append list to element stdout: ['1', '2 3', '4', '5']stderr: |
zsh | 13 typeset s+= stdout: stderr: typeset: not valid in this context: s+ |
zsh | 14 typeset s${dyn}+= stdout: stderr: typeset: not valid in this context: sx+ |
zsh | 15 export readonly += stdout: stderr: export: not valid in this context: e+ |
zsh | 16 local += stdout: stderr: f:local:1: not valid in this context: s+ |
mksh | 17 assign builtin appending array: declare d+=(d e) stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
zsh | 17 assign builtin appending array: declare d+=(d e) stdout: stderr: declare: not valid in this context: d+ |
bash | 18 export+=array disallowed (strict_array) stdout: e xstderr: bash: line 1: shopt: strict_array: invalid shell option name |