Results for var-op-patsub.test.sh

statusbashmkshzshoshosh_ALT
pass 2719212626
ok 11100
N-I 01000
BUG 07600
FAIL 00022
total2828282828
casebashmkshzshoshosh_ALTdescription
0pass pass pass pass pass Pattern replacement
1pass BUG pass pass pass Pattern replacement on unset variable
details
2pass pass pass pass pass Global Pattern replacement with /
3pass pass pass pass pass Left Anchored Pattern replacement with #
4pass pass pass pass pass Right Anchored Pattern replacement with %
5pass pass pass pass pass Replace fixed strings
6pass pass pass pass pass Replace is longest match
7pass N-I pass pass pass Replace char class
details
8pass pass pass pass pass Replace hard glob
9pass pass pass pass pass ${v/} is empty search and replacement
10pass pass pass pass pass ${v//} is empty search and replacement
11pass BUG BUG pass pass Confusing unquoted slash matches bash (and ash)
detailsdetails
12pass BUG BUG pass pass Synthesized ${x///} bug (similar to above)
detailsdetails
13pass pass pass pass pass ${v/a} is the same as ${v/a/} -- no replacement string
14pass pass pass pass pass Replacement with special chars (bug fix)
15pass BUG BUG pass pass Replace backslash
detailsdetails
16pass pass pass pass pass Replace right ]
17pass pass BUG pass pass Substitute glob characters in pattern, quoted and unquoted
details
18pass BUG pass pass pass Substitute one unicode character (UTF-8)
details
19pass pass pass FAIL FAIL Can't substitute one unicode character when LC_ALL=C
detailsdetails
20pass pass pass pass pass ${x/^} regression
21pass pass pass pass pass \(\) in pattern (regression)
22pass BUG pass pass pass patsub with single quotes and hyphen in character class (regression)
details
23pass pass pass FAIL FAIL patsub with [^]]
detailsdetails
24ok ok ok pass pass [a-z] Invalid range end is syntax error
detailsdetailsdetails
25pass pass BUG pass pass Pattern is empty $foo$bar -- regression for infinite loop
details
26pass BUG BUG pass pass Chromium from http://www.oilshell.org/blog/2016/11/07.html
detailsdetails
27pass pass pass pass pass ${x//~homedir/}
119 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 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:
osh_ALT19 Can't substitute one unicode character when LC_ALL=C

[osh_ALT 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:
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:
osh_ALT23 patsub with [^]]

[osh_ALT 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: