spec test index / oilshell.org
62 passed, 7 OK, 15 not implemented, 14 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
zsh | 1 Cannot take length of substring slice stdout: 3stderr: |
osh | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3} ^ [ stdin ]:2: Expected } after length expression |
osh_ALT | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3} ^ [ stdin ]:2: Expected } after length expression |
mksh | 2 Out of range string slice: begin stdout: 0stderr: |
mksh | 3 Out of range string slice: length stdout: _defg 0stderr: |
osh | 4 String slice: negative begin stdout: stderr: echo ${foo: -4:3} ^~ [ stdin ]:2: warning: The start index of a string slice can't be negative: -4 |
osh_ALT | 4 String slice: negative begin stdout: stderr: echo ${foo: -4:3} ^~ [ stdin ]:2: warning: The start index of a string slice can't be negative: -4 |
mksh | 5 String slice: negative second arg is position, not length stdout: defg defg defgstderr: |
osh | 5 String slice: negative second arg is position, not length stdout: stderr: echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -1 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -2 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -3 |
osh_ALT | 5 String slice: negative second arg is position, not length stdout: stderr: echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -1 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -2 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -3 |
bash | 6 strict_word_eval with string slice stdout: -c- -bc- -abc- -bc- ----stderr: bash: line 5: shopt: strict_word_eval: invalid shell option name |
mksh | 6 strict_word_eval with string slice stdout: -c- -bc- -abc- -bc- ----stderr: mksh: <stdin>[5]: shopt: not found |
zsh | 6 strict_word_eval with string slice stdout: -c- -bc- -abc- -bc- ----stderr: zsh: command not found: shopt |
mksh | 8 Slice undefined stdout: -- -- -done-stderr: |
mksh | 9 Slice UTF-8 String stdout: -μstderr: |
bash | 10 Slice string with invalid UTF-8 results in empty string and warning stdout: -bcd-stderr: |
mksh | 10 Slice string with invalid UTF-8 results in empty string and warning stdout: -bcd-stderr: |
zsh | 10 Slice string with invalid UTF-8 results in empty string and warning stdout: -bcd-stderr: |
bash | 11 Slice string with invalid UTF-8 with strict_word_eval stdout: slice -bcd-stderr: bash: line 1: shopt: strict_word_eval: invalid shell option name |
mksh | 11 Slice string with invalid UTF-8 with strict_word_eval stdout: slice -bcd-stderr: mksh: <stdin>[1]: shopt: not found |
zsh | 11 Slice string with invalid UTF-8 with strict_word_eval stdout: slice -bcd-stderr: zsh: command not found: shopt |
bash | 12 Slice with an index that's an array itself not allowed stdout: assigned destderr: |
mksh | 12 Slice with an index that's an array itself not allowed stdout: assigned destderr: |
bash | 13 Slice with an assoc array stdout: assigned abstderr: |
mksh | 13 Slice with an assoc array stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
zsh | 13 Slice with an assoc array stdout: assigned abstderr: zsh: no matches found: [5]=3 |
mksh | 14 Simple ${@:offset} stdout: stderr: mksh: <stdin>[2]: ${@: 0}: bad substitution mksh: <stdin>[4]: ${@: 1}: bad substitution |
mksh | 15 ${@:offset} and ${*:offset} stdout: stderr: mksh: <stdin>[27]: ${*: 0}: bad substitution |
zsh | 15 ${@:offset} and ${*:offset} stdout: stderr: |
mksh | 16 ${@:offset:length} and ${*:offset:length} stdout: stderr: mksh: <stdin>[27]: ${*: 0:2}: bad substitution |
zsh | 16 ${@:offset:length} and ${*:offset:length} stdout: stderr: |
mksh | 17 ${@:0:1} stdout: stderr: mksh: <stdin>[2]: ${@: 0:1}: bad substitution |
mksh | 18 ${array[@]::0} stdout: stderr: mksh: <stdin>[2]: ${array[@]:0:0}: bad substitution |
zsh | 18 ${array[@]::0} stdout: stderr: zsh: closing brace expected |
mksh | 19 ${array[@]::} stdout: stderr: mksh: <stdin>[2]: ${array[@]:0:}: bad substitution |
zsh | 19 ${array[@]::} stdout: stderr: zsh: closing brace expected |
osh | 19 ${array[@]::} [osh stdout] Expected '[]\n', got '' [osh status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::} ^ [ stdin ]:2: Token can't be used in prefix position |
osh_ALT | 19 ${array[@]::} [osh_ALT stdout] Expected '[]\n', got '' [osh_ALT status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::} ^ [ stdin ]:2: Token can't be used in prefix position |