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 'None\nX\n'

stdout:
None
X
stderr:
dumb_alloc:
	gNumNew = 2062
	gNumDelete = 169
	gMemPos = 70256

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

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

stdout:
None
None
X
X
stderr:
dumb_alloc:
	gNumNew = 2383
	gNumDelete = 225
	gMemPos = 79296

	gNumMalloc = 242
	gNumFree = 0
	gMemPos2 = 13104
osh_.cc4 Export a global variable and unset it

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

stdout:
None
None
X
g=
stderr:
dumb_alloc:
	gNumNew = 2441
	gNumDelete = 229
	gMemPos = 80928

	gNumMalloc = 287
	gNumFree = 0
	gMemPos2 = 13824
osh_.cc5 Export existing global variables

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 1953
	gNumDelete = 158
	gMemPos = 67344

	gNumMalloc = 108
	gNumFree = 0
	gMemPos2 = 10944
osh_.cc6 Export existing local variable

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2151
	gNumDelete = 192
	gMemPos = 73568

	gNumMalloc = 157
	gNumFree = 0
	gMemPos2 = 11744
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:
dumb_alloc:
	gNumNew = 2360
	gNumDelete = 227
	gMemPos = 80064

	gNumMalloc = 212
	gNumFree = 0
	gMemPos2 = 12640
osh_.cc8 Export a variable before defining it

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

stdout:
None
stderr:
dumb_alloc:
	gNumNew = 1865
	gNumDelete = 139
	gMemPos = 64928

	gNumMalloc = 85
	gNumFree = 0
	gMemPos2 = 10576
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\nNone\nnewvalue\n'

stdout:
None
None
None
newvalue
stderr:
dumb_alloc:
	gNumNew = 2367
	gNumDelete = 215
	gMemPos = 79376

	gNumMalloc = 271
	gNumFree = 0
	gMemPos2 = 13584
osh_.cc10 Exporting a parent func variable (dynamic scope)

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

stdout:
None
None
None
before inner
inner: X
after inner
stderr:
dumb_alloc:
	gNumNew = 2759
	gNumDelete = 291
	gMemPos = 92368

	gNumMalloc = 385
	gNumFree = 0
	gMemPos2 = 15456
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:106: 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 = 1923
	gNumDelete = 158
	gMemPos = 66128

	gNumMalloc = 72
	gNumFree = 0
	gMemPos2 = 10352
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 = 1864
	gNumDelete = 152
	gMemPos = 64720

	gNumMalloc = 52
	gNumFree = 0
	gMemPos2 = 10032
osh32 Unset wrong type

stdout:
undef 1
undef 1
array 0
array 0
assoc 0
assoc 0
stderr:
  unset -v 'undef[1]'
           ^
[ stdin ]:4: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:6: '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 ]:4: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:6: '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 ]:4: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:6: 'undef' isn't an array

dumb_alloc:
	gNumNew = 4247
	gNumDelete = 548
	gMemPos = 132272

	gNumMalloc = 782
	gNumFree = 0
	gMemPos2 = 21888
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 = 2155
	gNumDelete = 202
	gMemPos = 72640

	gNumMalloc = 131
	gNumFree = 0
	gMemPos2 = 11296