spec test index / oilshell.org
| status | osh | osh-cpp | |
| pass | 19 | 19 | |
| ok | 1 | 1 | |
| FAIL | 1 | 1 | |
| total | 21 | 21 | |
| case | osh | osh-cpp | description |
| 0 | pass | pass | String slice |
| 1 | ok | ok | Cannot take length of substring slice |
| details | details | ||
| 2 | pass | pass | Out of range string slice: begin |
| 3 | pass | pass | Out of range string slice: length |
| 4 | pass | pass | Negative start index |
| 5 | pass | pass | Negative start index respects unicode |
| 6 | pass | pass | Negative second arg is position, not length! |
| 7 | pass | pass | Negative start index respects unicode |
| 8 | pass | pass | String slice with math |
| 9 | pass | pass | Slice undefined |
| 10 | pass | pass | Slice UTF-8 String |
| 11 | pass | pass | Slice string with invalid UTF-8 results in empty string and warning |
| 12 | pass | pass | Slice string with invalid UTF-8 with strict_word_eval |
| 13 | pass | pass | Slice with an index that's an array -- silent a[0] decay |
| 14 | pass | pass | Slice with an assoc array |
| 15 | pass | pass | Simple ${@:offset} |
| 16 | pass | pass | ${@:offset} and ${*:offset} |
| 17 | pass | pass | ${@:offset:length} and ${*:offset:length} |
| 18 | pass | pass | ${@:0:1} |
| 19 | pass | pass | ${array[@]::0} |
| 20 | FAIL | FAIL | ${array[@]::} |
| details | details |
38 passed, 2 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| osh | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3}
^
[ stdin ]:2: Expected } after length expression
|
| osh-cpp | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3}
^
[ stdin ]:2: Expected } after length expression
|
| osh | 20 ${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-cpp | 20 ${array[@]::} [osh-cpp stdout] Expected '[]\n', got '' [osh-cpp status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::}
^
[ stdin ]:2: Token can't be used in prefix position
|