Results for ysh-regex-api.test.sh

statusosh
FAIL 38
total38
caseoshdescription
0FAIL s ~ regex and s !~ regex
details
1FAIL Invalid regex has libc error message
details
2FAIL Eggex flags to ignore case are respected
details
3FAIL Eggex flags to treat newlines as special are respected
details
4FAIL Positional captures with _group
details
5FAIL _group() returns null when group doesn't match
details
6FAIL _start() and _end()
details
7FAIL Str->search() method returns value.Match object
details
8FAIL Str->search() only matches %start ^ when pos == 0
details
9FAIL search() and leftMatch() accept ERE string
details
10FAIL Str.leftMatch() can implement lexer pattern
details
11FAIL Named captures with m.group()
details
12FAIL Named captures with _group() _start() _end()
details
13FAIL Named Capture Decays Without Name
details
14FAIL Nested Named Capture Uses ( ordering
details
15FAIL Capture with Type Conversion Func
details
16FAIL Named Capture with Type Conversion Func
details
17FAIL Can't splice eggex with different flags
details
18FAIL Eggex with translation preference has arbitrary flags
details
19FAIL Invalid sh operation on eggex
details
20FAIL Long Python Example
details
21FAIL Regex in a loop (bug regression)
details
22FAIL Regex in a loop depending on var
details
23FAIL Regex with [ (bug regression)
details
24FAIL Str.replace(Str, Str)
details
25FAIL Str.replace(Eggex, Str)
details
26FAIL Str.replace(Eggex, Expr)
details
27FAIL Str.replace(*, Expr), $0
details
28FAIL Str.replace(Eggex, Expr), scopes
details
29FAIL Str.replace(Eggex, *, count)
details
30FAIL Str.replace(Str, Str), empty new/old strings
details
31FAIL Str.replace(Eggex, Lazy), convert_func
details
32FAIL Str.replace(Eggex, *), eflags
details
33FAIL Str.replace(Eggex, *), guard against infinite loop
details
34FAIL Str.replace(Eggex, *), str cannot contain NUL bytes
details
35FAIL Str.replace() at top level
details
36FAIL Str.replace() lexical scope with ^""
details
37FAIL Str.replace() lexical scope with ^[]
details
0 passed, 0 OK, 0 not implemented, 0 BUG, 38 failed, 0 timeouts, 0 cases skipped
38 failed under osh

Details on runs that didn't PASS

osh0 s ~ regex and s !~ regex

[osh stdout] Expected "matches\n['foo', 'oo']\ndoes not match\n['foo', 'oo']\ngot expected status 3\ngot expected status 3\n" Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh1 Invalid regex has libc error message

[osh status] Expected 2, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh2 Eggex flags to ignore case are respected

[osh stdout] Expected 'yes\nyes\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh3 Eggex flags to treat newlines as special are respected

[osh stdout] Expected 'yes\nyes\nyes\nyes\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh4 Positional captures with _group

[osh stdout] Expected "['2020-08', '2020', '08']\n['2020-08', '2020', '08']\n['2020-08', '2020', '08']\n" Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh5 _group() returns null when group doesn't match

[osh stdout] Expected 'null b\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh6 _start() and _end()

[osh stdout] Expected 'start=3 end=6\n---\nstart=0 end=3\nstart=3 end=6\n---\nstart=0 end=3\nstart=-1 end=-1\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh7 Str->search() method returns value.Match object

[osh stdout] Expected 'g0 2 6 Hi5-\ng1 2 4 Hi\ng2 4 5 5\n---\ng0 7 12 Bye6-\ng1 7 10 Bye\ng2 10 11 6\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh8 Str->search() only matches %start ^ when pos == 0

[osh stdout] Expected 'pat=^([[:digit:]]+)-\n12-\npat=([[:digit:]]+)-\n12-\n34-\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh9 search() and leftMatch() accept ERE string

[osh stdout] Expected 'g0 2 6 hi5-\ng1 2 4 hi\ng2 4 5 5\n---\ng0 0 4 hi5-\ng1 0 2 hi\ng2 2 3 5\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh10 Str.leftMatch() can implement lexer pattern

[osh stdout] Expected 'pos=0\nnull/ab/null/\n\npos=2\nnull/null/ /\n\npos=3\n12/null/null/\n\npos=5\n===\npos=0\nnull/ab/null/\n\npos=2\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh11 Named captures with m.group()

[osh stdout] Expected "['2020', '08']\n3 7\n8 10\n", got ''
[osh status] Expected 3, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh12 Named captures with _group() _start() _end()

[osh stdout] Expected "['2020', '08']\n3 7\n8 10\n", got ''
[osh status] Expected 3, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh13 Named Capture Decays Without Name

[osh stdout] Expected '([[:digit:]]+)\nyes\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh14 Nested Named Capture Uses ( ordering

[osh stdout] Expected '0 when: 2023-10\n1 2023-10\n2 2023-10\n\nnull\n2023 10\nnull null null\n---\n0 when: 23:30\n1 23:30\n2 null\n\n23:30\nnull null\n23 30 null\n---\n0 when: 23:30:59\n1 23:30:59\n2 null\n\n23:30:59\nnull null\n23 30 59\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh15 Capture with Type Conversion Func

[osh stdout] Expected 'Int Float\nInt Float\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh16 Named Capture with Type Conversion Func

[osh stdout] Expected '-3.14\nInt Float\n-3.14\nInt Float\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh17 Can't splice eggex with different flags

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh18 Eggex with translation preference has arbitrary flags

[osh stdout] Expected 'yes\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh19 Invalid sh operation on eggex

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh20 Long Python Example

[osh stdout] Expected 'Y\nN\nY decimal\nN decimal\nY binary\nN binary\nY octal\nN octal\nY hex\nN hex\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh21 Regex in a loop (bug regression)

[osh stdout] Expected '1\n2\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh22 Regex in a loop depending on var

[osh stdout] Expected 'line foo\nmatched foo\nline bar\nmatched bar\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh23 Regex with [ (bug regression)

[osh stdout] Expected 'sq\nchar class\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh24 Str.replace(Str, Str)

[osh stdout] Expected 'AbcA\naBca\nabca\na\nnewanewbnewcnewanew\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh25 Str.replace(Eggex, Str)

[osh stdout] Expected 'mangled-kebab-case\nsmaller---to---bigger\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh26 Str.replace(Eggex, Expr)

[osh stdout] Expected "Hello Bob\nHello Bob (extracted from 'name: Bob')\n" Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh27 Str.replace(*, Expr), $0

[osh stdout] Expected 'class FooBar: # this class is called FooBar\nclass FooBar: # this class is called FooBar\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh28 Str.replace(Eggex, Expr), scopes

[osh stdout] Expected 'Hello 123 (surprise!)\nHello 123\nHello 123, 456\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh29 Str.replace(Eggex, *, count)

[osh stdout] Expected '1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n1abc2abc3abc\n1abc2abc3abc\n1abc2abc3abc\n1abc2abc3abc\n1-2abc3abc\n1-2abc3abc\n1-2abc3abc\n1-2abc3abc\n1-2-3abc\n1-2-3abc\n1-2-3abc\n1-2-3abc\n1-2-3-\n1-2-3-\n1-2-3-\n1-2-3-\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh30 Str.replace(Str, Str), empty new/old strings

[osh stdout] Expected 'a\nnewanewbnewcnewanew\nnewabca\nnewanewbnewcnewanew\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh31 Str.replace(Eggex, Lazy), convert_func

[osh stdout] Expected '124\n123\nstatus=3\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh32 Str.replace(Eggex, *), eflags

[osh stdout] Expected '[1]-[2]-[3]\n[4]-[5]\n[1]-2-3\n4-5\n[1]-2-3\n[4]-5\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh33 Str.replace(Eggex, *), guard against infinite loop

[osh status] Expected 3, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh34 Str.replace(Eggex, *), str cannot contain NUL bytes

[osh status] Expected 3, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh35 Str.replace() at top level

[osh stdout] Expected '<Expr>\nreplace my[x st t x]r\nmyreplace my[x st t x]r\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh36 Str.replace() lexical scope with ^""

[osh stdout] Expected '<Expr>\nreplace my[x st t x]r\nmyreplace my[x st t x]r\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh37 Str.replace() lexical scope with ^[]

[osh stdout] Expected '<Expr>\nreplace my[x st t x]r\nmyreplace my[x st t x]r\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_