spec test index / oilshell.org
0 passed, 0 OK, 0 not implemented, 0 BUG, 38 failed, 0 timeouts, 0 cases skipped 38 failed under osh
osh | 0 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_ |
osh | 1 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_ |
osh | 2 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_ |
osh | 3 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_ |
osh | 4 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_ |
osh | 5 _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_ |
osh | 6 _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_ |
osh | 7 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_ |
osh | 8 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_ |
osh | 9 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_ |
osh | 10 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_ |
osh | 11 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_ |
osh | 12 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_ |
osh | 13 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_ |
osh | 14 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_ |
osh | 15 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_ |
osh | 16 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_ |
osh | 17 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_ |
osh | 18 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_ |
osh | 19 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_ |
osh | 20 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_ |
osh | 21 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_ |
osh | 22 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_ |
osh | 23 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_ |
osh | 24 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_ |
osh | 25 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_ |
osh | 26 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_ |
osh | 27 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_ |
osh | 28 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_ |
osh | 29 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_ |
osh | 30 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_ |
osh | 31 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_ |
osh | 32 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_ |
osh | 33 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_ |
osh | 34 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_ |
osh | 35 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_ |
osh | 36 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_ |
osh | 37 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_ |