Results for ysh-scope.test.sh

statusoshosh_ALT
pass 1919
FAIL 55
total2424
caseoshosh_ALTdescription
0FAIL FAIL GetValue scope and shopt --unset dynamic_scope
detailsdetails
1pass pass SetValue scope and shopt --unset dynamic_scope
2pass pass read scope
3pass pass printf -v x respects dynamic_scope
4pass pass printf -v a[i] respects dynamic_scope
5pass pass ${undef=a} and shopt --unset dynamic_scope
6pass pass declare -p respects it
7pass pass OshLanguageSetValue constructs
8pass pass shell assignments 'neutered' inside 'proc'
9pass pass setglobal still allows setting globals
10pass pass setglobal d[key] inside proc should mutate global (bug #1841)
11pass pass setglobal a[i] inside proc
12pass pass setglobal a[i] += and d.key +=
13pass pass setglobal a[i] - i can be local or global
14pass pass unset inside proc uses local scope
15FAIL FAIL unset composes when you turn on dynamic scope
detailsdetails
16FAIL FAIL Temp Bindings
detailsdetails
17pass pass cd blocks don't introduce new scopes
18FAIL FAIL IFS=: myproc exports when it doesn't need to
detailsdetails
19pass pass shvar usage
20pass pass shvar global
21pass pass shvar local
22pass pass shvar IFS
23FAIL FAIL shvarGet()
detailsdetails
38 passed, 0 OK, 0 not implemented, 0 BUG, 5 failed, 0 timeouts, 0 cases skipped
5 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 'sh x=dynamic\nsh x=global\nx=global\n'

stdout:
sh x=dynamic
sh x=global
x=global
stderr:
    p
    ^
[ stdin ]:14: 'p' not found (OILS-ERR-100)
osh_ALT0 GetValue scope and shopt --unset dynamic_scope

[osh_ALT stdout] Expected 'sh x=dynamic\noil x=global\nsh x=global\nx=global\n' Got 'sh x=dynamic\nsh x=global\nx=global\n'

stdout:
sh x=dynamic
sh x=global
x=global
stderr:
    p
    ^
[ stdin ]:14: 'p' not found (OILS-ERR-100)
osh15 unset composes when you turn on dynamic scope

[osh stdout] Expected 'x=X y=Y\nx= y=\n', got 'x=X y=Y\n'
[osh status] Expected 0, got 127

stdout:
x=X y=Y
stderr:
    unset-two x y
    ^~~~~~~~~
[ stdin ]:16: 'unset-two' not found (OILS-ERR-100)
[ stdin ]:16: errexit PID 36039: command.Simple failed with status 127
osh_ALT15 unset composes when you turn on dynamic scope

[osh_ALT stdout] Expected 'x=X y=Y\nx= y=\n', got 'x=X y=Y\n'
[osh_ALT status] Expected 0, got 127

stdout:
x=X y=Y
stderr:
    unset-two x y
    ^~~~~~~~~
[ stdin ]:16: 'unset-two' not found (OILS-ERR-100)
[ stdin ]:16: errexit PID 36042: command.Simple failed with status 127
osh16 Temp Bindings

[osh stdout] Expected 'myfunc FOO=bar\nmyproc FOO=\ninline FOO=\nbar\n' Got 'myfunc FOO=bar\ninline FOO=\nbar\n'

stdout:
myfunc FOO=bar
inline FOO=
bar
stderr:
  FOO=bar myproc
          ^~~~~~
[ stdin ]:11: 'myproc' not found (OILS-ERR-100)
osh_ALT16 Temp Bindings

[osh_ALT stdout] Expected 'myfunc FOO=bar\nmyproc FOO=\ninline FOO=\nbar\n' Got 'myfunc FOO=bar\ninline FOO=\nbar\n'

stdout:
myfunc FOO=bar
inline FOO=
bar
stderr:
  FOO=bar myproc
          ^~~~~~
[ stdin ]:11: 'myproc' not found (OILS-ERR-100)
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 ":\n 20 09 0a 0a\nIFS= z\nmyfunc IFS= x\n['', 'z', 'z', 'z']\nmyproc IFS= x\n['', 'z', 'z', 'z']\n"

stdout:
:
 20 09 0a 0a
IFS= z
myfunc IFS= x
['', 'z', 'z', 'z']
myproc IFS= x
['', 'z', 'z', 'z']
stderr:
  IFS=' x' myproc
           ^~~~~~
[ stdin ]:26: 'myproc' not found (OILS-ERR-100)
osh_ALT18 IFS=: myproc exports when it doesn't need to

[osh_ALT 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 ":\n 20 09 0a 0a\nIFS= z\nmyfunc IFS= x\n['', 'z', 'z', 'z']\nmyproc IFS= x\n['', 'z', 'z', 'z']\n"

stdout:
:
 20 09 0a 0a
IFS= z
myfunc IFS= x
['', 'z', 'z', 'z']
myproc IFS= x
['', 'z', 'z', 'z']
stderr:
  IFS=' x' myproc
           ^~~~~~
[ stdin ]:26: 'myproc' not found (OILS-ERR-100)
osh23 shvarGet()

[osh stdout] Expected "wrong IFS=x\nshvar IFS=z\n['x', 'x ', 'x']\nnull\n" Got 'null\n'

stdout:
null
stderr:
  IFS=z myproc
        ^~~~~~
[ stdin ]:12: 'myproc' not found (OILS-ERR-100)
osh_ALT23 shvarGet()

[osh_ALT stdout] Expected "wrong IFS=x\nshvar IFS=z\n['x', 'x ', 'x']\nnull\n" Got 'null\n'

stdout:
null
stderr:
  IFS=z myproc
        ^~~~~~
[ stdin ]:12: 'myproc' not found (OILS-ERR-100)