Results for var-op-other.test.sh

casedashbashmkshzshoshosh_ALTosh-byterundescription
0pass pass pass pass pass pass pass String length
1N-I pass N-I pass pass pass pass Unicode string length (UTF-8)
detailsdetails
2N-I pass N-I pass pass pass pass Unicode string length (spec/testdata/utf8-chars.txt)
detailsdetails
3N-I BUG N-I BUG pass pass pass String length with incomplete utf-8
detailsdetailsdetailsdetails
4N-I BUG N-I BUG pass pass pass String length with invalid utf-8 continuation bytes
detailsdetailsdetailsdetails
5pass pass pass pass pass pass pass Length of undefined variable
6ok pass pass pass pass pass pass Length of undefined variable with nounset
details
7N-I pass pass ok ok ok ok Cannot take length of substring slice
detailsdetailsdetailsdetailsdetails
8N-I pass pass pass pass pass pass Pattern replacement
details
9N-I pass BUG pass pass pass pass Pattern replacement on unset variable
detailsdetails
10N-I pass pass pass pass pass pass Global Pattern replacement with /
details
11N-I pass pass pass pass pass pass Left Anchored Pattern replacement with #
details
12N-I pass pass pass pass pass pass Right Anchored Pattern replacement with %
details
13N-I pass pass pass pass pass pass Replace fixed strings
details
14N-I pass pass pass pass pass pass Replace is longest match
details
15N-I pass N-I pass pass pass pass Replace char class
detailsdetails
16N-I pass pass pass pass pass pass Replace hard glob
details
17N-I BUG BUG BUG pass pass pass Pattern replacement ${v/} is not valid
detailsdetailsdetailsdetails
18N-I BUG BUG BUG pass pass pass Pattern replacement ${v//} is not valid
detailsdetailsdetailsdetails
19N-I pass pass pass pass pass pass ${v/a} is the same as ${v/a/} -- no replacement string
details
20N-I pass pass pass pass pass pass String slice
details
21N-I pass BUG pass pass pass pass Out of range string slice: begin
detailsdetails
22N-I pass BUG pass pass pass pass Out of range string slice: length
detailsdetails
23N-I pass pass pass ok ok ok String slice: negative begin
detailsdetailsdetailsdetails
24N-I pass BUG pass ok ok ok String slice: negative second arg is position, not length
detailsdetailsdetailsdetailsdetails
25N-I N-I N-I N-I pass pass pass strict-word-eval with string slice
detailsdetailsdetailsdetails
26N-I pass pass pass pass pass pass String slice with math
details
27N-I pass BUG pass pass pass pass Slice undefined
detailsdetails
28N-I pass BUG pass pass pass pass Slice UTF-8 String
detailsdetails
29N-I BUG BUG BUG pass pass pass Slice string with invalid UTF-8 results in empty string and warning
detailsdetailsdetailsdetails
30N-I N-I N-I N-I pass pass pass Slice string with invalid UTF-8 with strict-word-eval
detailsdetailsdetailsdetails

148 passed, 11 ok, 39 known unimplemented, 19 known bugs, 0 failed, 0 skipped

Details on runs that didn't PASS

dash1 Unicode string length (UTF-8)

stdout:
9
stderr:
mksh1 Unicode string length (UTF-8)

stdout:
4
stderr:
dash2 Unicode string length (spec/testdata/utf8-chars.txt)

stdout:
13
stderr:
mksh2 Unicode string length (spec/testdata/utf8-chars.txt)

stdout:
13
stderr:
dash3 String length with incomplete utf-8

stdout:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
stderr:
bash3 String length with incomplete utf-8

stdout:
0
1
2
3
3
4
5
6
5
6
7
8
9
7
stderr:
mksh3 String length with incomplete utf-8

stdout:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
stderr:
zsh3 String length with incomplete utf-8

stdout:
0
1
2
3
3
4
5
6
5
6
7
8
9
7
stderr:
dash4 String length with invalid utf-8 continuation bytes

stdout:
7
8
9
10
11
12
13
14
15
16
17
18
19
20
20
stderr:
bash4 String length with invalid utf-8 continuation bytes

stdout:
1
2
3
4
4
5
6
7
6
7
8
9
10
8
8
stderr:
mksh4 String length with invalid utf-8 continuation bytes

stdout:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
14
stderr:
zsh4 String length with invalid utf-8 continuation bytes

stdout:
1
2
3
4
4
5
6
7
6
7
8
9
10
8
8
stderr:
dash6 Length of undefined variable with nounset

stdout:
stderr: 
_tmp/spec-bin/dash: 2: undef: parameter not set
dash7 Cannot take length of substring slice

stdout:
5
stderr:
zsh7 Cannot take length of substring slice

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

stdout:
stderr: 
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Expected } after length expression, got (token id:VOp2_Colon val:':' span_id:8)
---
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Error reading command word
---
*** Error has no source location info ***
Error parsing AndOr in ParseCommandTerm
---
osh_ALT7 Cannot take length of substring slice

stdout:
stderr: 
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Expected } after length expression, got (token id:VOp2_Colon val:':' span_id:8)
---
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Error reading command word
---
*** Error has no source location info ***
Error parsing AndOr in ParseCommandTerm
---
osh-byterun7 Cannot take length of substring slice

stdout:
stderr: 
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Expected } after length expression, got (token id:VOp2_Colon val:':' span_id:8)
---
Line 3 of '<stdin>'
  echo ${#v:1:3}
           ^
Error reading command word
---
*** Error has no source location info ***
Error parsing AndOr in ParseCommandTerm
---
dash8 Pattern replacement

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash9 Pattern replacement on unset variable

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Bad substitution
mksh9 Pattern replacement on unset variable

stdout:
--
status=0
--
stderr:
dash10 Global Pattern replacement with /

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash11 Left Anchored Pattern replacement with #

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash12 Right Anchored Pattern replacement with %

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash13 Replace fixed strings

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash14 Replace is longest match

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash15 Replace char class

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
mksh15 Replace char class

stdout:
xx_xx_xx xx_xx_xx
stderr:
dash16 Replace hard glob

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash17 Pattern replacement ${v/} is not valid

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
bash17 Pattern replacement ${v/} is not valid

stdout:
-abcde-
status=0
stderr:
mksh17 Pattern replacement ${v/} is not valid

stdout:
-abcde-
status=0
stderr:
zsh17 Pattern replacement ${v/} is not valid

stdout:
-abcde-
status=0
stderr:
dash18 Pattern replacement ${v//} is not valid

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
bash18 Pattern replacement ${v//} is not valid

stdout:
-a/b/c-
status=0
stderr:
mksh18 Pattern replacement ${v//} is not valid

stdout:
-a/b/c-
status=0
stderr:
zsh18 Pattern replacement ${v//} is not valid

stdout:
-a/b/c-
status=0
stderr:
dash19 ${v/a} is the same as ${v/a/} -- no replacement string

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash20 String slice

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
dash21 Out of range string slice: begin

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
mksh21 Out of range string slice: begin

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

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
mksh22 Out of range string slice: length

stdout:
_defg
0
stderr:
dash23 String slice: negative begin

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
osh23 String slice: negative begin

stdout:
stderr: 
osh warning: The start index of a string slice can't be negative: -4
osh_ALT23 String slice: negative begin

stdout:
stderr: 
osh warning: The start index of a string slice can't be negative: -4
osh-byterun23 String slice: negative begin

stdout:
stderr: 
osh warning: The start index of a string slice can't be negative: -4
dash24 String slice: negative second arg is position, not length

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
mksh24 String slice: negative second arg is position, not length

stdout:
defg defg defg
stderr:
osh24 String slice: negative second arg is position, not length

stdout:
stderr: 
osh warning: The length of a string slice can't be negative: -1
osh warning: The length of a string slice can't be negative: -2
osh warning: The length of a string slice can't be negative: -3
osh_ALT24 String slice: negative second arg is position, not length

stdout:
stderr: 
osh warning: The length of a string slice can't be negative: -1
osh warning: The length of a string slice can't be negative: -2
osh warning: The length of a string slice can't be negative: -3
osh-byterun24 String slice: negative second arg is position, not length

stdout:
stderr: 
osh warning: The length of a string slice can't be negative: -1
osh warning: The length of a string slice can't be negative: -2
osh warning: The length of a string slice can't be negative: -3
dash25 strict-word-eval with string slice

stdout:
stderr: 
_tmp/spec-bin/dash: 1: set: Illegal option -o strict-word-eval
bash25 strict-word-eval with string slice

stdout:
slice
-bc-
stderr:
_tmp/spec-bin/bash: line 1: set: strict-word-eval: invalid option name
mksh25 strict-word-eval with string slice

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: set: strict-word-eval: bad option
zsh25 strict-word-eval with string slice

stdout:
stderr: 
set: no such option: strict-word-eval
dash26 String slice with math

stdout:
stderr: 
_tmp/spec-bin/dash: 3: Bad substitution
dash27 Slice undefined

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Bad substitution
mksh27 Slice undefined

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

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
mksh28 Slice UTF-8 String

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

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Bad substitution
bash29 Slice string with invalid UTF-8 results in empty string and warning

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

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

stdout:
-bcd-
stderr:
dash30 Slice string with invalid UTF-8 with strict-word-eval

stdout:
stderr: 
_tmp/spec-bin/dash: 1: set: Illegal option -o strict-word-eval
bash30 Slice string with invalid UTF-8 with strict-word-eval

stdout:
slice
-bcd-
stderr:
_tmp/spec-bin/bash: line 1: set: strict-word-eval: invalid option name
mksh30 Slice string with invalid UTF-8 with strict-word-eval

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: set: strict-word-eval: bad option
zsh30 Slice string with invalid UTF-8 with strict-word-eval

stdout:
stderr: 
set: no such option: strict-word-eval