Results for builtin-vars.test.sh

statusoshosh_.pyosh_.cc
pass 373727
ok 333
FAIL 1111
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 FAIL Dependent export setting
details
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)
101 passed, 9 OK, 0 not implemented, 0 BUG, 13 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'
[osh_.cc status] Expected 0, got 255

stdout:
X
None
stderr:
dumb_alloc:
	gNumNew = 2083
	gNumDelete = 168
	gMemPos = 70608

	gNumMalloc = 140
	gNumFree = 0
	gMemPos2 = 10832
osh_.cc1 Export sets a global variable that persists after export -n

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

stdout:
X
X
None
None
stderr:
dumb_alloc:
	gNumNew = 2411
	gNumDelete = 224
	gMemPos = 79760

	gNumMalloc = 241
	gNumFree = 0
	gMemPos2 = 12464
osh_.cc4 Export a global variable and unset it

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

stdout:
X
g=
None
None
stderr:
dumb_alloc:
	gNumNew = 2469
	gNumDelete = 229
	gMemPos = 81392

	gNumMalloc = 286
	gNumFree = 0
	gMemPos2 = 13184
osh_.cc5 Export existing global variables

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 1974
	gNumDelete = 157
	gMemPos = 67696

	gNumMalloc = 107
	gNumFree = 0
	gMemPos2 = 10304
osh_.cc6 Export existing local variable

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2174
	gNumDelete = 191
	gMemPos = 73952

	gNumMalloc = 156
	gNumFree = 0
	gMemPos2 = 11104
osh_.cc7 Export a local that shadows a global

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

stdout:
None
None
None
stderr:
dumb_alloc:
	gNumNew = 2387
	gNumDelete = 226
	gMemPos = 80512

	gNumMalloc = 211
	gNumFree = 0
	gMemPos2 = 12000
osh_.cc8 Export a variable before defining it

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

stdout:
None
stderr:
dumb_alloc:
	gNumNew = 1884
	gNumDelete = 138
	gMemPos = 65248

	gNumMalloc = 84
	gNumFree = 0
	gMemPos2 = 9936
osh_.cc9 Unset exported variable, then define it again. It's NOT still exported.

[osh_.cc stdout] Expected 'u\nNone\nnewvalue\nNone\n', got 'newvalue\nNone\nNone\nNone\n'
[osh_.cc status] Expected 0, got 255

stdout:
newvalue
None
None
None
stderr:
dumb_alloc:
	gNumNew = 2394
	gNumDelete = 214
	gMemPos = 79824

	gNumMalloc = 270
	gNumFree = 0
	gMemPos2 = 12944
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\ninner: X\nafter inner\nNone\nNone\nNone\n'
[osh_.cc status] Expected 0, got 255

stdout:
before inner
inner: X
after inner
None
None
None
stderr:
dumb_alloc:
	gNumNew = 2792
	gNumDelete = 291
	gMemPos = 92912

	gNumMalloc = 384
	gNumFree = 0
	gMemPos2 = 14816
osh_.cc11 Dependent export setting

[osh_.cc stdout] Expected 'v=None\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
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

dumb_alloc:
	gNumNew = 1966
	gNumDelete = 158
	gMemPos = 67376

	gNumMalloc = 71
	gNumFree = 0
	gMemPos2 = 9712
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

dumb_alloc:
	gNumNew = 1904
	gNumDelete = 152
	gMemPos = 65920

	gNumMalloc = 51
	gNumFree = 0
	gMemPos2 = 9392
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

dumb_alloc:
	gNumNew = 4334
	gNumDelete = 548
	gMemPos = 134320

	gNumMalloc = 781
	gNumFree = 0
	gMemPos2 = 21280
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:
dumb_alloc:
	gNumNew = 2200
	gNumDelete = 204
	gMemPos = 73920

	gNumMalloc = 130
	gNumFree = 0
	gMemPos2 = 10656