Results for var-op-patsub.test.sh

statusoshosh-cpp
pass 2626
FAIL 22
total2828
caseoshosh-cppdescription
0pass pass Pattern replacement
1pass pass Pattern replacement on unset variable
2pass pass Global Pattern replacement with /
3pass pass Left Anchored Pattern replacement with #
4pass pass Right Anchored Pattern replacement with %
5pass pass Replace fixed strings
6pass pass Replace is longest match
7pass pass Replace char class
8pass pass Replace hard glob
9pass pass ${v/} is empty search and replacement
10pass pass ${v//} is empty search and replacement
11pass pass Confusing unquoted slash matches bash (and ash)
12pass pass Synthesized ${x///} bug (similar to above)
13pass pass ${v/a} is the same as ${v/a/} -- no replacement string
14pass pass Replacement with special chars (bug fix)
15pass pass Replace backslash
16pass pass Replace right ]
17pass pass Substitute glob characters in pattern, quoted and unquoted
18pass pass Substitute one unicode character (UTF-8)
19FAIL FAIL When LC_ALL=C, pattern ? doesn't match multibyte character
detailsdetails
20pass pass ${x/^} regression
21pass pass \(\) in pattern (regression)
22pass pass patsub with single quotes and hyphen in character class (regression)
23FAIL FAIL patsub with [^]]
detailsdetails
24pass pass [a-z] Invalid range end is syntax error
25pass pass Pattern is empty $foo$bar -- regression for infinite loop
26pass pass Chromium from http://www.oilshell.org/blog/2016/11/07.html
27pass pass ${x//~homedir/}
52 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

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:
osh-cpp19 When LC_ALL=C, pattern ? doesn't match multibyte character

[osh-cpp 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:
osh23 patsub with [^]]

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

stdout:
zzzzzz
stderr:
osh-cpp23 patsub with [^]]

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

stdout:
zzzzzz
stderr: