Results for builtin-vars.test.sh

statusoshosh_.pyosh_.cc
pass 373728
ok 333
FAIL 1110
total414141
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL Export sets a global variable
details
1pass pass FAIL Export sets a global variable that persists after export -n
details
2pass pass pass export -n undefined is ignored
3pass pass pass export -n foo=bar not allowed
4pass pass FAIL Export a global variable and unset it
details
5pass pass FAIL Export existing global variables
details
6pass pass FAIL Export existing local variable
details
7pass pass FAIL Export a local that shadows a global
details
8pass pass FAIL Export a variable before defining it
details
9pass pass FAIL Unset exported variable, then define it again. It's NOT still exported.
details
10pass pass FAIL Exporting a parent func variable (dynamic scope)
details
11pass pass pass Dependent export setting
12pass pass pass Exporting a variable doesn't change it
13ok ok ok can't export array
detailsdetailsdetails
14ok ok ok can't export associative array
detailsdetailsdetails
15pass pass pass assign to readonly variable
16pass pass pass Make an existing local variable readonly
17pass pass pass assign to readonly variable - errexit
18pass pass pass Unset a variable
19pass pass pass Unset exit status
20pass pass pass Unset nonexistent variable
21pass pass pass Unset readonly variable
22pass pass pass Unset a function without -f
23pass pass pass Unset has dynamic scope
24pass pass pass Unset and scope (bug #653)
25pass pass pass unset of local reveals variable in higher scope
26pass pass pass Unset invalid variable name
27pass pass pass Unset nonexistent variable
28pass pass pass Unset -v
29pass pass pass Unset -f
30pass pass pass Unset array member
31pass pass pass Unset errors
32ok ok ok Unset wrong type
detailsdetailsdetails
33pass pass pass unset -v assoc (related to issue #661)
34pass pass pass unset assoc errors
35pass pass pass Unset array member with dynamic parsing
36pass pass pass Use local twice
37pass pass pass Local without variable is still unset!
38FAIL FAIL FAIL local after readonly
detailsdetailsdetails
39pass pass pass unset a[-1] (bf.bash regression)
40pass pass pass unset a[-1] in sparse array (bf.bash regression)
102 passed, 9 OK, 0 not implemented, 0 BUG, 12 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh_.cc0 Export sets a global variable

[osh_.cc stdout] Expected 'X\nX\n', got 'X\nNone\n'

stdout:
X
None
stderr:
osh_.cc1 Export sets a global variable that persists after export -n

[osh_.cc stdout] Expected 'X\nX\nX\nNone\n', got 'X\nNone\nX\nNone\n'

stdout:
X
None
X
None
stderr:
osh_.cc4 Export a global variable and unset it

[osh_.cc stdout] Expected 'X\nX\ng=\nNone\n', got 'X\nNone\ng=\nNone\n'

stdout:
X
None
g=
None
stderr:
osh_.cc5 Export existing global variables

[osh_.cc stdout] Expected 'g1\ng2\n', got 'None\nNone\n'

stdout:
None
None
stderr:
osh_.cc6 Export existing local variable

[osh_.cc stdout] Expected 'local1\nNone\n', got 'None\nNone\n'

stdout:
None
None
stderr:
osh_.cc7 Export a local that shadows a global

[osh_.cc stdout] Expected 'local1\nNone\nglobal\n', got 'None\nNone\nNone\n'

stdout:
None
None
None
stderr:
osh_.cc8 Export a variable before defining it

[osh_.cc stdout] Expected 'u\n', got 'None\n'

stdout:
None
stderr:
osh_.cc9 Unset exported variable, then define it again. It's NOT still exported.

[osh_.cc stdout] Expected 'u\nNone\nnewvalue\nNone\n', got 'None\nNone\nnewvalue\nNone\n'

stdout:
None
None
newvalue
None
stderr:
osh_.cc10 Exporting a parent func variable (dynamic scope)

[osh_.cc stdout] Expected 'before inner\nNone\ninner: X\nX\nafter inner\nX\n', got 'before inner\nNone\ninner: X\nNone\nafter inner\nNone\n'

stdout:
before inner
None
inner: X
None
after inner
None
stderr:
osh13 can't export array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.py13 can't export array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.cc13 can't export array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh14 can't export associative array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.py14 can't export associative array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.cc14 can't export associative array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh32 Unset wrong type

stdout:
undef 1
undef 1
array 0
array 0
assoc 0
assoc 0
stderr:
  unset -v 'undef[1]'
           ^
[ stdin ]:6: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:8: 'undef' isn't an array
osh_.py32 Unset wrong type

stdout:
undef 1
undef 1
array 0
array 0
assoc 0
assoc 0
stderr:
  unset -v 'undef[1]'
           ^
[ stdin ]:6: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:8: 'undef' isn't an array
osh_.cc32 Unset wrong type

stdout:
undef 1
undef 1
array 0
array 0
assoc 0
assoc 0
stderr:
  unset -v 'undef[1]'
           ^
[ stdin ]:6: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:8: 'undef' isn't an array
osh38 local after readonly

[osh stdout] Expected u'', got 'y=0\ny=\n'
[osh status] Expected 1, got 0

stdout:
y=0
y=
stderr:
osh_.py38 local after readonly

[osh_.py stdout] Expected u'', got 'y=0\ny=\n'
[osh_.py status] Expected 1, got 0

stdout:
y=0
y=
stderr:
osh_.cc38 local after readonly

[osh_.cc stdout] Expected u'', got 'y=0\ny=\n'
[osh_.cc status] Expected 1, got 0

stdout:
y=0
y=
stderr: