Results for ysh-scope.test.sh

statusosh
FAIL 26
total26
caseoshdescription
0FAIL GetValue scope and shopt --unset dynamic_scope
details
1FAIL SetValue scope and shopt --unset dynamic_scope
details
2FAIL read scope
details
3FAIL printf -v x respects dynamic_scope
details
4FAIL printf -v a[i] respects dynamic_scope
details
5FAIL ${undef=a} and shopt --unset dynamic_scope
details
6FAIL declare -p respects it
details
7FAIL OshLanguageSetValue constructs
details
8FAIL shell assignments 'neutered' inside 'proc'
details
9FAIL setglobal still allows setting globals
details
10FAIL setglobal d[key] inside proc should mutate global (bug #1841)
details
11FAIL setglobal a[i] inside proc
details
12FAIL setglobal a[i] += and d.key +=
details
13FAIL setglobal a[i] - i can be local or global
details
14FAIL unset inside proc - closures and dynamic scope
details
15FAIL unset composes when you turn on dynamic scope
details
16FAIL Temp Bindings
details
17FAIL cd blocks don't introduce new scopes
details
18FAIL shvar IFS=x { myproc } rather than IFS=x myproc - no dynamic scope
details
19FAIL shvar builtin syntax
details
20FAIL shvar and shvarGet() obey dynamic scope
details
21FAIL shvar global
details
22FAIL shvar local
details
23FAIL shvar IFS
details
24FAIL Compare shell func vs. proc, $IFS vs. shvarGet('IFS')
details
25FAIL func and proc are like var, with respect to closures
details
0 passed, 0 OK, 0 not implemented, 0 BUG, 26 failed, 0 timeouts, 0 cases skipped
26 failed under osh

Details on runs that didn't PASS

osh0 GetValue scope and shopt --unset dynamic_scope

[osh stdout] Expected 'sh x=dynamic\nysh 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh1 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh2 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh3 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh4 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh5 ${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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh6 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh7 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh8 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh9 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh10 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh11 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh12 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh13 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh14 unset inside proc - closures and dynamic scope

[osh stdout] Expected 'shellfunc x=\nunset-proc x=\nunset-proc-dynamic-scope 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh15 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh16 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh17 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh18 shvar IFS=x { myproc } rather than IFS=x myproc - no dynamic scope

[osh stdout] Expected ":\n 20 09 0a 0a\nIFS= z\n\nshellfunc IFS= z\n['x', 'x', 'x']\n\nshellfunc IFS= x\n['', 'z', 'z', 'z']\n\nmyproc IFS= z\n['x', 'x', 'x']\n\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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh19 shvar builtin syntax

[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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh20 shvar and shvarGet() obey dynamic scope

[osh stdout] Expected 'FOO=foo\n' Got ''
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh21 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh22 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh23 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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh24 Compare shell func vs. proc, $IFS vs. shvarGet('IFS')

[osh stdout] Expected "shellfunc\nIFS=z\nshvarGet IFS=z\n['x', 'x ', 'x']\n\nmyproc -> p2\nIFS=x\nshvarGet IFS=x\n['', 'z', ' z', 'z']\n\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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang
osh25 func and proc are like var, with respect to closures

[osh stdout] Expected 'inner inner\nouter outer\n\ninner inner\nouter outer\n\ninner\nouter\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 27, in <module>
    from core import shell
  File "/home/uke/oil/core/shell.py", line 40, in <module>
    from builtin import dirs_osh
  File "/home/uke/oil/builtin/dirs_osh.py", line 15, in <module>
    from oil_lang import path_stat
ImportError: No module named oil_lang