Results for var-op-patsub.test.sh

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

[ksh stdout] Expected '--\nstatus=0\n', got '--\nstatus=0\n--\n'
[ksh status] Expected 1, got 0

stdout:
--
status=0
--
stderr:
toysh1 Pattern replacement on unset variable

[toysh stdout] Expected '--\nstatus=0\n', got '\nstatus=0\n\n'
[toysh status] Expected 1, got 0

stdout:
status=0

stderr:
set: bad -o nounset
sush1 Pattern replacement on unset variable

[sush stdout] Expected '--\nstatus=0\n', got '--\nstatus=0\n--\n'
[sush status] Expected 1, got 0

stdout:
--
status=0
--
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: nounset: invalid option name
brush1 Pattern replacement on unset variable

[brush stdout] Expected '--\nstatus=0\n', got '--\nstatus=0\n--\n'
[brush status] Expected 1, got 0

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

[toysh stdout] Expected 'yy_xx_xx yy_yy_xx\n', got 'yy_xx_xx yy_yy_yy_<0\xf8\xd2\x7f\n'

stdout:
'yy_xx_xx yy_yy_yy_<0\xf8\xd2\x7f\n'
stderr:
mksh7 Replace char class

stdout:
xx_xx_xx xx_xx_xx
stderr:
ksh7 Replace char class

[ksh stdout] Expected 'yy_yy_yy xx-xx-xx\n', got 'yy_yy_yy --_--_--\n'

stdout:
yy_yy_yy --_--_--
stderr:
toysh7 Replace char class

[toysh stdout] Expected 'yy_yy_yy xx-xx-xx\n', got 'xx_xx_xx xx_xx_xx\n'

stdout:
xx_xx_xx xx_xx_xx
stderr:
toysh8 Replace hard glob

[toysh stdout] Expected 'aa__cc\n', got 'aa__\n'

stdout:
aa__
stderr:
sush8 Replace hard glob

[sush stdout] Expected 'aa__cc\n', got '__cc\n'

stdout:
__cc
stderr:
mksh11 Confusing unquoted slash matches bash (and ash)

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

[ksh stdout] Expected 'c_c\nc_c\n', got '/_/\nc_c\n'

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

[toysh stdout] Expected 'c_c\nc_c\n', got '/_/\n/_/\n'

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

[sush stdout] Expected 'c_c\nc_c\n', got '/_/\nc_c\n'

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

[brush stdout] Expected 'c_c\nc_c\n', got '/c//c_/c//c\nc_c\n'

stdout:
/c//c_/c//c
c_c
stderr:
mksh12 Synthesized ${x///} bug (similar to above)

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

[ksh stdout] Expected 'ambiguous: slash brace } hi\nquoted: slash brace } hi\n' Got 'ambiguous: slash / brace } hi\nquoted: slash brace } hi\n'

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

[toysh stdout] Expected 'ambiguous: slash brace } hi\nquoted: slash brace } hi\n' Got 'ambiguous: slash / brace } hi\nquoted: slash / brace } hi\n'

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

[sush stdout] Expected 'ambiguous: slash brace } hi\nquoted: slash brace } hi\n' Got 'ambiguous: slash / brace } hi\nquoted: slash brace } hi\n'

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

[brush stdout] Expected 'ambiguous: slash brace } hi\nquoted: slash brace } hi\n' Got 'ambiguous: slash / brace } hi\nquoted: slash brace } hi\n'

stdout:
ambiguous: slash / brace } hi
quoted:    slash brace } hi
stderr:
toysh14 Replacement with special chars (bug fix)

[toysh stdout] Expected '?x\n', got '"?"x\n'

stdout:
"?"x
stderr:
mksh15 Replace backslash

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

[ksh stdout] Expected '[_]\n[\\_]\n[\\_]\n[_]\n', got '[_]\n[_]\n[\\_]\n[_]\n'

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

[toysh stdout] Expected '[_]\n[\\_]\n[\\_]\n[_]\n', got '[\\f]\n[\\f]\n[\\]\n[_]\n'

stdout:
[\f]
[\f]
[\]
[_]
stderr:
sush15 Replace backslash

[sush stdout] Expected '[_]\n[\\_]\n[\\_]\n[_]\n', got '[\\_]\n[\\_]\n[\\_]\n[\\_]\n'

stdout:
[\_]
[\_]
[\_]
[\_]
stderr:
toysh16 Replace right ]

[toysh stdout] Expected '--_--\n--_--\n', got '--]--\n--]--\n'

stdout:
--]--
--]--
stderr:
toysh17 Substitute glob characters in pattern, quoted and unquoted

[toysh stdout] Expected 'a-b\n-\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush17 Substitute glob characters in pattern, quoted and unquoted

[sush stdout] Expected 'a-b\n-\n', got '-\n-\n'

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

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

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

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

[brush 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:
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:
toysh20 ${x/^} regression

[toysh stdout] Expected 'abc\nabc\n^^\n^^^\n!!!\n!!\nb!c\na^c\n', got 'abc\nabc\n^^\n^^^\n!!!\n!!!\nb!c\na^!c\n'

stdout:
abc
abc
^^
^^^
!!!
!!!
b!c
a^!c
stderr:
toysh21 \(\) in pattern (regression)

[toysh stdout] Expected '1 z\n2 z\n3 fooz\n4 z\n', got '1 z\n2 z\n3 foo\n4 z\n'

stdout:
1 z
2 z
3 foo
4 z
stderr:
sush21 \(\) in pattern (regression)

[sush stdout] Expected '1 z\n2 z\n3 fooz\n4 z\n', got '1 foo()\n2 foo()\n3 fooz\n4 foo()\n'

stdout:
1 foo()
2 foo()
3 fooz
4 foo()
stderr:
mksh22 patsub with single quotes and hyphen in character class (regression)

stdout:
helloworld
stderr:
ksh22 patsub with single quotes and hyphen in character class (regression)

[ksh stdout] Expected '++--.,<>[]\n', got 'helloworld\n'

stdout:
helloworld
stderr:
toysh22 patsub with single quotes and hyphen in character class (regression)

[toysh stdout] Expected '++--.,<>[]\n', got '^++--hello.,world<>[]\n'

stdout:
^++--hello.,world<>[]
stderr:
sush22 patsub with single quotes and hyphen in character class (regression)

[sush stdout] Expected '++--.,<>[]\n', got '^++--hello.,world<>[]\n'

stdout:
^++--hello.,world<>[]
stderr:
brush22 patsub with single quotes and hyphen in character class (regression)

[brush stdout] Expected '++--.,<>[]\n', got '^++--hello.,world<>[]\n'

stdout:
^++--hello.,world<>[]
stderr:
ERROR error: invalid regex: Parsing error at position 27: Invalid character class; expression: '(?ms)[^\>\<\+\-\.\,\\\[\]\]'
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:
ksh24 [a-z] Invalid range end is syntax error

[ksh stdout] Expected u'', got 'fooz\nstatus=0\n'
[ksh status] Expected 1, got 0

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

[toysh stdout] Expected u'', got 'fooz\nstatus=0\n'
[toysh status] Expected 1, got 0

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

[sush stdout] Expected u'', got 'fooz\nstatus=0\n'
[sush status] Expected 1, got 0

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

[brush stdout] Expected u'', got 'status=1\n'
[brush status] Expected 1, got 0

stdout:
status=1
stderr:
ERROR error: invalid regex: Error compiling regex: Regex error: error parsing pattern 0; expression: '(?ms)[z-a]'
sush25 Pattern is empty $foo$bar -- regression for infinite loop

[sush stdout] Expected '-foo-\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: parse error
brush25 Pattern is empty $foo$bar -- regression for infinite loop

[brush stdout] Expected '-foo-\n', got 'bar-barfbarobarobar-bar\n'

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

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

[ksh stdout] Expected '\\/foo\\/bar\\/baz\n\\/foo\\/bar\\/baz\n', got '/foo/bar/baz\n\\/foo\\/bar\\/baz\n'

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

[toysh stdout] Expected '\\/foo\\/bar\\/baz\n\\/foo\\/bar\\/baz\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush26 Chromium from http://www.oilshell.org/blog/2016/11/07.html

[sush stdout] Expected '\\/foo\\/bar\\/baz\n\\/foo\\/bar\\/baz\n', got '/foo/bar/baz\n\\/foo\\/bar\\/baz\n'

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

[brush stdout] Expected '\\/foo\\/bar\\/baz\n\\/foo\\/bar\\/baz\n', got '/\\///\\/f/\\/o/\\/o/\\///\\/b/\\/a/\\/r/\\///\\/b/\\/a/\\/z/\\/\n\\/foo\\/bar\\/baz\n'

stdout:
/\///\/f/\/o/\/o/\///\/b/\/a/\/r/\///\/b/\/a/\/z/\/
\/foo\/bar\/baz
stderr:
sush27 ${x//~homedir/}

[sush stdout] Expected 'z/git/oilshell\nz/git/oilshell\n', got 'zzgitzoilshell\nz/git/oilshell\n'

stdout:
zzgitzoilshell
z/git/oilshell
stderr: