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 = 2114
	gNumDelete = 168
	gMemPos = 71568

	gNumMalloc = 142
	gNumFree = 0
	gMemPos2 = 10864
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 = 2452
	gNumDelete = 228
	gMemPos = 81264

	gNumMalloc = 243
	gNumFree = 1
	gMemPos2 = 12528
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 = 2501
	gNumDelete = 230
	gMemPos = 82608

	gNumMalloc = 288
	gNumFree = 0
	gMemPos2 = 13216
osh_.cc5 Export existing global variables

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2023
	gNumDelete = 163
	gMemPos = 69232

	gNumMalloc = 109
	gNumFree = 2
	gMemPos2 = 10400
osh_.cc6 Export existing local variable

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

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2215
	gNumDelete = 195
	gMemPos = 75456

	gNumMalloc = 158
	gNumFree = 1
	gMemPos2 = 11168
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 = 2437
	gNumDelete = 233
	gMemPos = 82304

	gNumMalloc = 213
	gNumFree = 2
	gMemPos2 = 12096
osh_.cc8 Export a variable before defining it

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

stdout:
None
stderr:
dumb_alloc:
	gNumNew = 1924
	gNumDelete = 141
	gMemPos = 66496

	gNumMalloc = 86
	gNumFree = 1
	gMemPos2 = 10000
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 = 2436
	gNumDelete = 219
	gMemPos = 81584

	gNumMalloc = 272
	gNumFree = 1
	gMemPos2 = 13008
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 = 2833
	gNumDelete = 295
	gMemPos = 94416

	gNumMalloc = 386
	gNumFree = 1
	gMemPos2 = 14880
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 = 2016
	gNumDelete = 164
	gMemPos = 68960

	gNumMalloc = 73
	gNumFree = 2
	gMemPos2 = 9808
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 = 1954
	gNumDelete = 158
	gMemPos = 67504

	gNumMalloc = 53
	gNumFree = 2
	gMemPos2 = 9488
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 = 4376
	gNumDelete = 551
	gMemPos = 135664

	gNumMalloc = 783
	gNumFree = 1
	gMemPos2 = 21344
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 = 2240
	gNumDelete = 207
	gMemPos = 75184

	gNumMalloc = 132
	gNumFree = 1
	gMemPos2 = 10720