Results for ysh-scope.test.sh

statusosh
pass 20
FAIL 2
total22
caseoshdescription
0pass GetValue scope and shopt --unset dynamic_scope
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
10FAIL setglobal d[key] inside proc should mutate global (bug #1841)
details
11FAIL setglobal a[i] inside proc
details
12pass unset inside proc uses local scope
13pass unset composes when you turn on dynamic scope
14pass Temp Bindings
15pass cd blocks don't introduce new scopes
16pass IFS=: myproc exports when it doesn't need to
17pass shvar usage
18pass shvar global
19pass shvar local
20pass shvar IFS
21pass shvarGet()
20 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh10 setglobal d[key] inside proc should mutate global (bug #1841)

[osh stdout] Expected 'BEFORE mutate\n(Dict) {}\nhi from mutate\n(Dict) {"key":"mutated","key2":"mutated"}\nAFTER mutate\n(Dict) {"key":"mutated","key2":"mutated"}\n' Got 'BEFORE mutate\n(Dict) {}\nhi from mutate\n(Dict) {"key":"mutated","key2":"mutated"}\nAFTER mutate\n(Dict) {}\n'

stdout:
BEFORE mutate
(Dict)   {}
hi from mutate
(Dict)   {"key":"mutated","key2":"mutated"}
AFTER mutate
(Dict)   {}
stderr:
osh11 setglobal a[i] inside proc

[osh stdout] Expected 'BEFORE mutate\n(List) [0]\nhi from mutate\n(List) [42]\nAFTER mutate\n(List) [42]\n' Got 'BEFORE mutate\n(List) [0]\nhi from mutate\n(List) [42]\nAFTER mutate\n(List) [0]\n'

stdout:
BEFORE mutate
(List)   [0]
hi from mutate
(List)   [42]
AFTER mutate
(List)   [0]
stderr: