Results for var-op-slice.test.sh

statusbashmkshzshoshosh_ALT
pass 154111616
ok 00133
N-I 29400
BUG 37400
FAIL 00011
total2020202020
casebashmkshzshoshosh_ALTdescription
0pass pass pass pass pass String slice
1pass pass ok ok ok Cannot take length of substring slice
detailsdetailsdetails
2pass BUG pass pass pass Out of range string slice: begin
details
3pass BUG pass pass pass Out of range string slice: length
details
4pass pass pass ok ok String slice: negative begin
detailsdetails
5pass BUG pass ok ok String slice: negative second arg is position, not length
detailsdetailsdetails
6N-I N-I N-I pass pass strict_word_eval with string slice
detailsdetailsdetails
7pass pass pass pass pass String slice with math
8pass BUG pass pass pass Slice undefined
details
9pass BUG pass pass pass Slice UTF-8 String
details
10BUG BUG BUG pass pass Slice string with invalid UTF-8 results in empty string and warning
detailsdetailsdetails
11N-I N-I N-I pass pass Slice string with invalid UTF-8 with strict_word_eval
detailsdetailsdetails
12BUG BUG pass pass pass Slice with an index that's an array itself not allowed
detailsdetails
13BUG N-I BUG pass pass Slice with an assoc array
detailsdetailsdetails
14pass N-I pass pass pass Simple ${@:offset}
details
15pass N-I BUG pass pass ${@:offset} and ${*:offset}
detailsdetails
16pass N-I BUG pass pass ${@:offset:length} and ${*:offset:length}
detailsdetails
17pass N-I pass pass pass ${@:0:1}
details
18pass N-I N-I pass pass ${array[@]::0}
detailsdetails
19pass N-I N-I FAIL FAIL ${array[@]::}
detailsdetailsdetailsdetails
62 passed, 7 OK, 15 not implemented, 14 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

zsh1 Cannot take length of substring slice

stdout:
3
stderr:
osh1 Cannot take length of substring slice

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

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression
mksh2 Out of range string slice: begin

stdout:
0
stderr:
mksh3 Out of range string slice: length

stdout:
_defg
0
stderr:
osh4 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_ALT4 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
mksh5 String slice: negative second arg is position, not length

stdout:
defg defg defg
stderr:
osh5 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_ALT5 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
bash6 strict_word_eval with string slice

stdout:
-c-
-bc-
-abc-
-bc-
----
stderr:
bash: line 5: shopt: strict_word_eval: invalid shell option name
mksh6 strict_word_eval with string slice

stdout:
-c-
-bc-
-abc-
-bc-
----
stderr:
mksh: <stdin>[5]: shopt: not found
zsh6 strict_word_eval with string slice

stdout:
-c-
-bc-
-abc-
-bc-
----
stderr:
zsh: command not found: shopt
mksh8 Slice undefined

stdout:
--
--
-done-
stderr:
mksh9 Slice UTF-8 String

stdout:
stderr:
bash10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
mksh10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
zsh10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
bash11 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
mksh11 Slice string with invalid UTF-8 with strict_word_eval

stdout:
slice
-bcd-
stderr:
mksh: <stdin>[1]: shopt: not found
zsh11 Slice string with invalid UTF-8 with strict_word_eval

stdout:
slice
-bcd-
stderr:
zsh: command not found: shopt
bash12 Slice with an index that's an array itself not allowed

stdout:
assigned
de
stderr:
mksh12 Slice with an index that's an array itself not allowed

stdout:
assigned
de
stderr:
bash13 Slice with an assoc array

stdout:
assigned
ab
stderr:
mksh13 Slice with an assoc array

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
zsh13 Slice with an assoc array

stdout:
assigned
ab
stderr:
zsh: no matches found: [5]=3
mksh14 Simple ${@:offset}

stdout:
stderr: 
mksh: <stdin>[2]: ${@: 0}: bad substitution
mksh: <stdin>[4]: ${@: 1}: bad substitution
mksh15 ${@:offset} and ${*:offset}

stdout:
stderr: 
mksh: <stdin>[27]: ${*: 0}: bad substitution
zsh15 ${@:offset} and ${*:offset}

stdout:
stderr: 
mksh16 ${@:offset:length} and ${*:offset:length}

stdout:
stderr: 
mksh: <stdin>[27]: ${*: 0:2}: bad substitution
zsh16 ${@:offset:length} and ${*:offset:length}

stdout:
stderr: 
mksh17 ${@:0:1}

stdout:
stderr: 
mksh: <stdin>[2]: ${@: 0:1}: bad substitution
mksh18 ${array[@]::0}

stdout:
stderr: 
mksh: <stdin>[2]: ${array[@]:0:0}: bad substitution
zsh18 ${array[@]::0}

stdout:
stderr: 
zsh: closing brace expected
mksh19 ${array[@]::}

stdout:
stderr: 
mksh: <stdin>[2]: ${array[@]:0:}: bad substitution
zsh19 ${array[@]::}

stdout:
stderr: 
zsh: closing brace expected
osh19 ${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_ALT19 ${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