Results for ysh-scope.test.sh

statusoshosh-cpp
pass 2516
FAIL 110
total2626
caseoshosh-cppdescription
0pass pass GetValue scope and shopt --unset dynamic_scope
1pass pass SetValue scope and shopt --unset dynamic_scope
2pass pass read scope (setref)
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 FAIL setglobal still allows setting globals
details
10pass FAIL setref with out Ref param
details
11pass FAIL setref with conflicting variable name
details
12pass FAIL setref of regular param is a fatal error
details
13pass FAIL setref equivalent without pgen2 syntax, using open proc
details
14pass FAIL setref a, b = 'one', 'two'
details
15FAIL FAIL setref a[i]
detailsdetails
16pass pass unset inside proc uses local scope
17pass pass unset composes when you turn on dynamic scope
18pass pass Temp Bindings
19pass FAIL cd blocks don't introduce new scopes
details
20pass pass IFS=: myproc exports when it doesn't need to
21pass pass shvar usage
22pass pass shvar global
23pass FAIL shvar local
details
24pass pass shvar IFS
25pass FAIL shvar_get()
details
41 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh-cpp9 setglobal still allows setting globals

[osh-cpp stdout] Expected 'g=p new_global=p\n', got 'g= new_global=\n'

stdout:
g= new_global=
stderr:
osh-cpp10 setref with out Ref param

[osh-cpp stdout] Expected 'foo-SS\nfoo-TT\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc set-it(s Ref, val) {
                ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block
osh-cpp11 setref with conflicting variable name

[osh-cpp stdout] Expected 'oops=foo-zz\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc set-it(s Ref, val) {
                ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block
osh-cpp12 setref of regular param is a fatal error

[osh-cpp status] Expected 1, got 2

stdout:
stderr: 
  proc set-it(s Ref, val) {
                ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block
osh-cpp13 setref equivalent without pgen2 syntax, using open proc

[osh-cpp stdout] Expected 'foo-SS\nfoo-TT\n', got '\n\n'

stdout:

stderr:
osh-cpp14 setref a, b = 'one', 'two'

[osh-cpp stdout] Expected 'c=foo1 d=foo2\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc p(x, a Ref, b Ref) {
              ^~~
[ stdin ]:3: proc param types should be Ref, Expr, or Block
osh15 setref a[i]

[osh stdout] Expected 'a\nz\nc\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  proc set1(:a, item) {
  ^~~~
[ stdin ]:1: Enable YSH to use procs (parse_proc)
osh-cpp15 setref a[i]

[osh-cpp stdout] Expected 'a\nz\nc\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc set1(:a, item) {
  ^~~~
[ stdin ]:1: Enable YSH to use procs (parse_proc)
osh-cpp19 cd blocks don't introduce new scopes

[osh-cpp stdout] Expected '42 0 1\n42 43 44\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
    echo $x $y $z
         ^~
[ stdin ]:6: fatal: Undefined variable 'x'
osh-cpp23 shvar local

[osh-cpp stdout] Expected "['a', 'b', 'c']\nIFS=x\n['a b c']\nMYTEMP=foo\n['a', 'b', 'c']\nMYTEMP=undef\n" Got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  argv.py $s
          ^~
[ stdin ]:12: fatal: Undefined variable 's'
osh-cpp25 shvar_get()

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

stdout:
wrong IFS=x
shvar IFS=
['x', 'x ', 'x']
stderr: