| status | osh | osh-cpp | |
| pass | 8 | 5 | |
| FAIL | 1 | 4 | |
| total | 9 | 9 | |
| case | osh | osh-cpp | description |
| 0 | pass | pass | String length |
| 1 | pass | pass | Unicode string length (UTF-8) |
| 2 | pass | FAIL | Unicode string length (spec/testdata/utf8-chars.txt) |
| details | |||
| 3 | pass | FAIL | String length with incomplete utf-8 |
| details | |||
| 4 | pass | FAIL | String length with invalid utf-8 continuation bytes |
| details | |||
| 5 | pass | pass | Length of undefined variable |
| 6 | pass | pass | Length of undefined variable with nounset |
| 7 | pass | pass | Length operator can't be followed by test operator |
| 8 | FAIL | FAIL | ${#s} respects LC_ALL - length in bytes or code points |
| details | details |
13 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| osh-cpp | 2 Unicode string length (spec/testdata/utf8-chars.txt) [osh-cpp stdout] Expected '7\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: v=$(cat $REPO_ROOT/spec/testdata/utf8-chars.txt)
^
[ stdin ]:1: Invalid word while parsing command list
|
| osh-cpp | 3 String length with incomplete utf-8 [osh-cpp stdout] Expected '0\n1\n2\n-1\n3\n4\n-1\n-1\n5\n6\n-1\n-1\n-1\n7\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 2 in string of 3 bytes\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 5 in string of 6 bytes\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 5 in string of 7 bytes\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 9 in string of 10 bytes\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 9 in string of 11 bytes\n[ stdin ]:3: warning: UTF-8 decode: Truncated bytes at offset 9 in string of 12 bytes\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: s=$(head -c $num_bytes $REPO_ROOT/spec/testdata/utf8-chars.txt)
^
[ stdin ]:2: Invalid word while parsing command list
|
| osh-cpp | 4 String length with invalid utf-8 continuation bytes [osh-cpp stdout] Expected '-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 0 in string of 1 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 1 in string of 2 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 2 in string of 3 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 2 in string of 4 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 4 in string of 5 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 5 in string of 6 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 5 in string of 7 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 5 in string of 8 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 8 in string of 9 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 9 in string of 10 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 9 in string of 11 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 9 in string of 12 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 9 in string of 13 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 13 in string of 14 bytes\n[ stdin ]:3: warning: UTF-8 decode: Bad encoding at offset 13 in string of 14 bytes\n' Got '' [osh-cpp status] Expected 0 Got 2 stdout: stderr: s=$(head -c $num_bytes $REPO_ROOT/spec/testdata/utf8-chars.txt)$(echo -e "\xFF")
^
[ stdin ]:2: Invalid word while parsing command list
|
| 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: |
| osh-cpp | 8 ${#s} respects LC_ALL - length in bytes or code points [osh-cpp 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: |