Results for var-op-patsub.test.sh

statusbashmkshzshosh
pass 27192126
ok 1110
N-I 0100
BUG 0760
FAIL 0002
total28282828
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
9pass pass pass pass ${v/} is empty search and replacement
10pass pass pass pass ${v//} is empty search and replacement
11pass BUG BUG pass Confusing unquoted slash matches bash (and ash)
detailsdetails
12pass BUG BUG pass Synthesized ${x///} bug (similar to above)
detailsdetails
13pass pass pass pass ${v/a} is the same as ${v/a/} -- no replacement string
14pass pass pass pass Replacement with special chars (bug fix)
15pass BUG BUG pass Replace backslash
detailsdetails
16pass pass pass pass Replace right ]
17pass pass BUG pass Substitute glob characters in pattern, quoted and unquoted
details
18pass BUG pass pass Substitute one unicode character (UTF-8)
details
19pass pass pass FAIL When LC_ALL=C, pattern ? doesn't match multibyte character
details
20pass pass pass pass ${x/^} regression
21pass pass pass pass \(\) in pattern (regression)
22pass BUG pass pass patsub with single quotes and hyphen in character class (regression)
details
23pass pass pass FAIL patsub with [^]]
details
24ok ok ok pass [a-z] Invalid range end is syntax error
detailsdetailsdetails
25pass pass BUG pass Pattern is empty $foo$bar -- regression for infinite loop
details
26pass BUG BUG pass Chromium from http://www.oilshell.org/blog/2016/11/07.html
detailsdetails
27pass pass pass pass ${x//~homedir/}
93 passed, 3 OK, 1 not implemented, 13 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:
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:
mksh12 Synthesized ${x///} bug (similar to above)

stdout:
ambiguous: slash / brace } hi
quoted:    slash brace } hi
stderr:
zsh12 Synthesized ${x///} bug (similar to above)

stdout:
ambiguous: slash / brace } hi
quoted:    slash / brace } hi
stderr:
mksh15 Replace backslash

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

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

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

stdout:
_μ_ and _μ_
_μ_ and _μ_
_μ_ and _μ_
stderr:
osh19 When LC_ALL=C, pattern ? doesn't match multibyte character

[osh stdout] Expected '_\xce\xbc_ and _\xce\xbc_\n_\xce\xbc_ and _\xce\xbc_\n_\xce\xbc_ and _\xce\xbc_\n\nfoo and foo\nfoo and _y_\n_x_ and foo\n' Got 'foo and foo\nfoo and _\xce\xbc_\n_\xce\xbc_ and foo\n\nfoo and foo\nfoo and _y_\n_x_ and foo\n'

stdout:
foo and foo
foo and _μ_
_μ_ and foo

foo and foo
foo and _y_
_x_ and foo
stderr:
mksh22 patsub with single quotes and hyphen in character class (regression)

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

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

stdout:
zzzzzz
stderr:
bash24 [a-z] Invalid range end is syntax error

stdout:
fooz
status=0
stderr:
mksh24 [a-z] Invalid range end is syntax error

stdout:
fooz
status=0
stderr:
zsh24 [a-z] Invalid range end is syntax error

stdout:
fooz
status=0
stderr:
zsh25 Pattern is empty $foo$bar -- regression for infinite loop

stdout:
bar-barfbarobarobar-
stderr:
mksh26 Chromium from http://www.oilshell.org/blog/2016/11/07.html

stdout:
/foo/bar/baz
\/foo\/bar\/baz
stderr:
zsh26 Chromium from http://www.oilshell.org/blog/2016/11/07.html

stdout:
stderr: