Results for var-op-patsub.test.sh

statusbashmkshzshosh
pass 21151822
ok 1110
N-I 0100
BUG 2750
FAIL 0002
total24242424
casebashmkshzshoshdescription
0pass pass pass pass Pattern replacement
1pass BUG pass pass Pattern replacement on unset variable
details
2pass pass pass pass Global Pattern replacement with /
3pass pass pass pass Left Anchored Pattern replacement with #
4pass pass pass pass Right Anchored Pattern replacement with %
5pass pass pass pass Replace fixed strings
6pass pass pass pass Replace is longest match
7pass N-I pass pass Replace char class
details
8pass pass pass pass Replace hard glob
9BUG BUG BUG pass Pattern replacement ${v/} is not valid
detailsdetailsdetails
10BUG BUG BUG pass Pattern replacement ${v//} is not valid
detailsdetailsdetails
11pass BUG BUG pass Confusing unquoted slash matches bash (and ash)
detailsdetails
12pass pass pass pass ${v/a} is the same as ${v/a/} -- no replacement string
13pass pass pass pass Replacement with special chars (bug fix)
14pass BUG BUG pass Replace backslash
detailsdetails
15pass pass pass pass Replace right ]
16pass pass BUG pass Substitute glob characters in pattern, quoted and unquoted
details
17pass BUG pass pass Substitute one unicode character (UTF-8)
details
18pass pass pass FAIL Can't substitute one unicode character when LC_ALL=C
details
19pass pass pass pass ${x/^} regression
20pass pass pass pass \(\) in pattern (regression)
21pass BUG pass pass patsub with single quotes and hyphen in character class (regression)
details
22pass pass pass FAIL patsub with [^]]
details
23ok ok ok pass patsub syntax error
detailsdetailsdetails
76 passed, 3 OK, 1 not implemented, 14 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

mksh1 Pattern replacement on unset variable

stdout:
--
status=0
--
stderr:
mksh7 Replace char class

stdout:
xx_xx_xx xx_xx_xx
stderr:
bash9 Pattern replacement ${v/} is not valid

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

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

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

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

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

stdout:
-a/b/c-
status=0
stderr:
mksh11 Confusing unquoted slash matches bash (and ash)

stdout:
/_/
c_c
stderr:
zsh11 Confusing unquoted slash matches bash (and ash)

stdout:
/c//c_/c/
/_/
stderr:
mksh14 Replace backslash

stdout:
[_]
[_]
[\_]
[_]
stderr:
zsh14 Replace backslash

stdout:
[_]
[_]
[\_]
[_]
stderr:
zsh16 Substitute glob characters in pattern, quoted and unquoted

stdout:
a-b
a-b
stderr:
mksh17 Substitute one unicode character (UTF-8)

stdout:
_μ_ and _μ_
_μ_ and _μ_
_μ_ and _μ_
stderr:
osh18 Can't substitute one unicode character when LC_ALL=C

[osh stdout] Expected '_\xce\xbc_ and _\xce\xbc_\n_\xce\xbc_ and _\xce\xbc_\n_\xce\xbc_ and _\xce\xbc_\n', got 'foo and foo\nfoo and _\xce\xbc_\n_\xce\xbc_ and foo\n'

stdout:
foo and foo
foo and _μ_
_μ_ and foo
stderr:
mksh21 patsub with single quotes and hyphen in character class (regression)

stdout:
helloworld
stderr:
osh22 patsub with [^]]

[osh stdout] Expected 'ab^cd^\n', got 'zzzzzz\n'

stdout:
zzzzzz
stderr:
bash23 patsub syntax error

stdout:
fooz
status=0
stderr:
mksh23 patsub syntax error

stdout:
fooz
status=0
stderr:
zsh23 patsub syntax error

stdout:
fooz
status=0
stderr: