spec test index / oilshell.org
0 passed, 0 OK, 0 not implemented, 0 BUG, 24 failed, 0 timeouts, 0 cases skipped 24 failed under osh
osh | 0 GetValue scope and shopt --unset dynamic_scope [osh stdout] Expected 'sh x=dynamic\noil x=global\nsh x=global\nx=global\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 SetValue scope and shopt --unset dynamic_scope [osh stdout] Expected 'x=stack\n---\nf x=f\np x=stack\nfunset x=stack\n---\nx=global\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 | 2 read scope [osh stdout] Expected 'x_before=42\nx_after=dynamic-scope\nx=\n---\nx_before=42\nx_after=42\nx=\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 printf -v x respects dynamic_scope [osh stdout] Expected 'x=42\nx=dynamic-scope\nx=\n---\nx=42\nx=42\nx=\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 printf -v a[i] respects dynamic_scope [osh stdout] Expected 'a[1]=42\na[1]=dynamic-scope\na[1]=\n---\na[1]=42\na[1]=42\na[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 | 5 ${undef=a} and shopt --unset dynamic_scope [osh stdout] Expected 'x=\nx=new\nx=\n---\nx=\nx=\nx=\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 declare -p respects it [osh stdout] Expected 'declare -- ___g=G\ndeclare -- ___x=X\ndeclare -- ___y=Y\nstatus=0\n-\ndeclare -- ___y=Y\nstatus=0\n---\ndeclare -- ___g=G\ndeclare -- ___x=X\nstatus=0\n-\nstatus=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 OshLanguageSetValue constructs [osh stdout] Expected 'x=42\n---\nx=\n--- global\nx=\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 shell assignments 'neutered' inside 'proc' [osh stdout] Expected 'e=E g=G\ne=E g=G\ne=SH g=SH\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 setglobal still allows setting globals [osh stdout] Expected 'g=p new_global=p\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 setglobal d[key] inside proc should mutate global (bug #1841) [osh stdout] Expected 'BEFORE mutate global\n(Dict) {}\nlocal that is ignored\n(Dict) {"local":1}\nAFTER mutate global\n(Dict) {"key":"mutated","key2":"mutated"}\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 setglobal a[i] inside proc [osh stdout] Expected 'BEFORE mutate global\n(List) [0]\nlocal that is ignored\n(List) [1]\nAFTER mutate global\n(List) [42]\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 | 12 setglobal a[i] += and d.key += [osh stdout] Expected '(List) [5]\n(Dict) {"k":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 | 13 setglobal a[i] - i can be local or global [osh stdout] Expected '(List) [0,11]\n(Dict) {"k":0,"n":11}\n\n(List) [22,11]\n(Dict) {"k":22,"n":11}\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 unset inside proc uses local scope [osh stdout] Expected 'f x=\np x=bar\np2 x=\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 unset composes when you turn on dynamic scope [osh stdout] Expected 'x=X y=Y\nx= y=\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 Temp Bindings [osh stdout] Expected 'myfunc FOO=bar\nmyproc FOO=\ninline FOO=\nbar\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 cd blocks don't introduce new scopes [osh stdout] Expected '42 0 1\n42 43 44\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 | 18 IFS=: myproc exports when it doesn't need to [osh stdout] Expected ":\n 20 09 0a 0a\nIFS= z\nmyfunc IFS= x\n['', 'z', 'z', 'z']\nmyproc IFS= z\n['', 'z', 'z', 'z']\nmyproc IFS= x\n['', 'z', 'z', 'z']\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 shvar usage [osh stdout] Expected 'status=2\nstatus=2\nstatus=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 | 20 shvar global [osh stdout] Expected '_ESCAPER=\n_DIALECT=\nblock _ESCAPER=html\nblock _DIALECT=ninja\n_ESCAPER=\n_DIALECT=\n___\n_ESCAPER=foo\n_DIALECT=bar\nblock _ESCAPER=html\nblock _DIALECT=ninja\nnested _ESCAPER=nested\nnested _DIALECT=ninja\n_ESCAPER=foo\n_DIALECT=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 | 21 shvar local [osh stdout] Expected "['a', 'b', 'c']\nIFS=x\n['a b c']\nMYTEMP=foo\n['a', 'b', 'c']\nMYTEMP=undef\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 shvar IFS [osh stdout] Expected ' 20 09 0a 0a\ninside IFS=w\nmylocal=x\n 20 09 0a 0a\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 shvarGet() [osh stdout] Expected "wrong IFS=x\nshvar IFS=z\n['x', 'x ', 'x']\nnull\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_ |