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 = 2033
	gNumDelete = 167
	gMemPos = 69008

	gNumMalloc = 141
	gNumFree = 0
	gMemPos2 = 10688
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 = 2354
	gNumDelete = 223
	gMemPos = 78048

	gNumMalloc = 242
	gNumFree = 0
	gMemPos2 = 12320
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 = 2412
	gNumDelete = 227
	gMemPos = 79680

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

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 1924
	gNumDelete = 156
	gMemPos = 66096

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

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2122
	gNumDelete = 190
	gMemPos = 72320

	gNumMalloc = 157
	gNumFree = 0
	gMemPos2 = 10960
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 = 2331
	gNumDelete = 225
	gMemPos = 78816

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

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

stdout:
None
stderr:
dumb_alloc:
	gNumNew = 1836
	gNumDelete = 137
	gMemPos = 63680

	gNumMalloc = 85
	gNumFree = 0
	gMemPos2 = 9792
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 = 2338
	gNumDelete = 213
	gMemPos = 78128

	gNumMalloc = 271
	gNumFree = 0
	gMemPos2 = 12800
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 = 2730
	gNumDelete = 289
	gMemPos = 91120

	gNumMalloc = 385
	gNumFree = 0
	gMemPos2 = 14672
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 = 9568
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 = 9248
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 = 21088
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 = 10512