| status | dash | bash | mksh | zsh | osh | |
| pass | 2 | 6 | 3 | 6 | 8 | |
| ok | 1 | 1 | 1 | 0 | 0 | |
| N-I | 5 | 0 | 4 | 0 | 0 | |
| BUG | 1 | 2 | 1 | 3 | 0 | |
| FAIL | 0 | 0 | 0 | 0 | 1 | |
| total | 9 | 9 | 9 | 9 | 9 | |
| case | dash | bash | mksh | zsh | osh | description |
| 0 | pass | pass | pass | pass | pass | String length |
| 1 | N-I | pass | N-I | pass | pass | Unicode string length (UTF-8) |
| details | details | |||||
| 2 | N-I | pass | N-I | pass | pass | Unicode string length (spec/testdata/utf8-chars.txt) |
| details | details | |||||
| 3 | N-I | BUG | N-I | BUG | pass | String length with incomplete utf-8 |
| details | details | details | details | |||
| 4 | N-I | BUG | N-I | BUG | pass | String length with invalid utf-8 continuation bytes |
| details | details | details | details | |||
| 5 | pass | pass | pass | pass | pass | Length of undefined variable |
| 6 | ok | pass | pass | pass | pass | Length of undefined variable with nounset |
| details | ||||||
| 7 | BUG | ok | ok | BUG | pass | Length operator can't be followed by test operator |
| details | details | details | details | |||
| 8 | N-I | pass | BUG | pass | FAIL | ${#s} respects LC_ALL - length in bytes or code points |
| details | details | details |
25 passed, 3 OK, 9 not implemented, 7 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| dash | 1 Unicode string length (UTF-8) stdout: 9stderr: |
| mksh | 1 Unicode string length (UTF-8) stdout: 4stderr: |
| dash | 2 Unicode string length (spec/testdata/utf8-chars.txt) stdout: 13stderr: |
| mksh | 2 Unicode string length (spec/testdata/utf8-chars.txt) stdout: 13stderr: |
| dash | 3 String length with incomplete utf-8 stdout: 0 1 2 3 4 5 6 7 8 9 10 11 12 13stderr: |
| bash | 3 String length with incomplete utf-8 stdout: 0 1 2 3 3 4 5 6 5 6 7 8 9 7stderr: |
| mksh | 3 String length with incomplete utf-8 stdout: 0 1 2 3 4 5 6 7 8 9 10 11 12 13stderr: |
| zsh | 3 String length with incomplete utf-8 stdout: 0 1 2 3 3 4 5 6 5 6 7 8 9 7stderr: |
| dash | 4 String length with invalid utf-8 continuation bytes stdout: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 20stderr: |
| bash | 4 String length with invalid utf-8 continuation bytes stdout: 1 2 3 4 4 5 6 7 6 7 8 9 10 8 8stderr: |
| mksh | 4 String length with invalid utf-8 continuation bytes stdout: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14stderr: |
| zsh | 4 String length with invalid utf-8 continuation bytes stdout: 1 2 3 4 4 5 6 7 6 7 8 9 10 8 8stderr: |
| dash | 6 Length of undefined variable with nounset stdout: stderr: dash: 2: undef: parameter not set |
| dash | 7 Length operator can't be followed by test operator stdout: 0 0 3stderr: |
| bash | 7 Length operator can't be followed by test operator stdout: stderr: bash: line 1: ${#x-default}: bad substitution
bash: line 4: ${#x-default}: bad substitution
bash: line 7: ${#x-default}: bad substitution
|
| mksh | 7 Length operator can't be followed by test operator stdout: stderr: mksh: <stdin>[1]: ${#x-default}: bad substitution
|
| zsh | 7 Length operator can't be followed by test operator stdout: 7 0 3stderr: |
| dash | 8 ${#s} respects LC_ALL - length in bytes or code points stdout: stderr: |
| mksh | 8 ${#s} respects LC_ALL - length in bytes or code points stdout: len=2 len=2 len=3 len=3stderr: |
| osh | 8 ${#s} respects LC_ALL - length in bytes or code points [osh stdout] Expected 'len=1\nlen=2\n\nlen=1\nlen=4\n\n' Got 'len=1\nlen=1\n\nlen=1\nlen=1\n\n' stdout: len=1 len=1 len=1 len=1stderr: |