Results for ysh-scope.test.sh

statusosh
FAIL 24
total24
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 uses local 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 IFS=: myproc exports when it doesn't need to
details
19FAIL shvar usage
details
20FAIL shvar global
details
21FAIL shvar local
details
22FAIL shvar IFS
details
23FAIL shvarGet()
details
0 passed, 0 OK, 0 not implemented, 0 BUG, 24 failed, 0 timeouts, 0 cases skipped
24 failed under osh

Details on runs that didn't PASS

osh0 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_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh14 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_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
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 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh18 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_
osh19 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_
osh20 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_
osh21 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_
osh22 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_
osh23 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_