Results for ysh-scope.test.sh

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