Results for ysh-scope.test.sh

statusoshosh-cpp
pass 1919
FAIL 55
total2424
caseoshosh-cppdescription
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-cpp0 GetValue scope and shopt --unset dynamic_scope

[osh-cpp 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 31350: command.Simple failed with status 127
osh-cpp15 unset composes when you turn on dynamic scope

[osh-cpp stdout] Expected 'x=X y=Y\nx= y=\n', got 'x=X y=Y\n'
[osh-cpp 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 31360: 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-cpp16 Temp Bindings

[osh-cpp 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-cpp18 IFS=: myproc exports when it doesn't need to

[osh-cpp 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-cpp23 shvarGet()

[osh-cpp 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)