Results for var-op-slice.test.sh

statusoshosh-cpp
pass 2020
ok 22
total2222
caseoshosh-cppdescription
0pass pass String slice
1ok ok Cannot take length of substring slice
detailsdetails
2pass pass Out of range string slice: begin
3pass pass Out of range string slice: length
4pass pass Negative start index
5pass pass Negative start index respects unicode
6pass pass Negative second arg is position, not length!
7pass pass Negative start index respects unicode
8pass pass String slice with math
9pass pass Slice undefined
10pass pass Slice UTF-8 String
11pass pass Slice string with invalid UTF-8 results in empty string and warning
12pass pass Slice string with invalid UTF-8 with strict_word_eval
13pass pass Slice with an index that's an array -- silent a[0] decay
14pass pass Slice with an assoc array
15pass pass Simple ${@:offset}
16pass pass ${@:offset} and ${*:offset}
17pass pass ${@:offset:length} and ${*:offset:length}
18pass pass ${@:0:1}
19pass pass Permutations of implicit begin and length
20ok ok ${array[@]:} vs ${array[@]: } - bash and zsh inconsistent
detailsdetails
21pass pass ${array[@]::} has implicit length of zero - for ble.sh
40 passed, 4 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
osh-cpp1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
osh20 ${array[@]:} vs ${array[@]: } - bash and zsh inconsistent

stdout:
['1', '2', '3']
['space', '1', '2', '3']
['123']
['space', '123']
stderr:
osh-cpp20 ${array[@]:} vs ${array[@]: } - bash and zsh inconsistent

stdout:
['1', '2', '3']
['space', '1', '2', '3']
['123']
['space', '123']
stderr: