Results for append.test.sh

statusoshosh_.pyosh_.cc
pass 995
ok 222
FAIL 004
total111111
caseoshosh_.pyosh_.ccdescription
0pass pass pass Append string to string
1pass pass FAIL Append array to array
details
2pass pass pass Append array to string should be an error
3pass pass pass Append string to array should be disallowed
4pass pass FAIL Append string to array element
details
5pass pass FAIL Append to last element
details
6ok ok ok Try to append list to element
detailsdetailsdetails
7pass pass pass Strings have value semantics, not reference semantics
8ok ok ok Append to nonexistent string
detailsdetailsdetails
9pass pass FAIL Append to nonexistent array is allowed
details
10pass pass pass Append used like env prefix is a parse error
23 passed, 6 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc1 Append array to array

[osh_.cc status] Expected 0, got 255

stdout:
['x', 'y', 't', 'u v']
stderr:
dumb_alloc:
	gNumNew = 1958
	gNumDelete = 153
	gMemPos = 66512

	gNumMalloc = 102
	gNumFree = 0
	gMemPos2 = 10208
osh_.cc4 Append string to array element

[osh_.cc status] Expected 0, got 255

stdout:
['x', 'yz']
stderr:
dumb_alloc:
	gNumNew = 1909
	gNumDelete = 142
	gMemPos = 65472

	gNumMalloc = 95
	gNumFree = 0
	gMemPos2 = 10096
osh_.cc5 Append to last element

[osh_.cc status] Expected 0, got 255

stdout:
['1', '2 3 4']
stderr:
dumb_alloc:
	gNumNew = 1915
	gNumDelete = 146
	gMemPos = 65568

	gNumMalloc = 94
	gNumFree = 0
	gMemPos2 = 10080
osh6 Try to append list to element

stdout:
stderr: 
  a[-1]+=(4 5)
          ^
[ stdin ]:2: Expected ) in function definition
osh_.py6 Try to append list to element

stdout:
stderr: 
  a[-1]+=(4 5)
          ^
[ stdin ]:2: Expected ) in function definition
osh_.cc6 Try to append list to element

stdout:
stderr: 
  a[-1]+=(4 5)
          ^
[ stdin ]:2: Expected ) in function definition

dumb_alloc:
	gNumNew = 1763
	gNumDelete = 116
	gMemPos = 61376

	gNumMalloc = 57
	gNumFree = 0
	gMemPos2 = 9488
osh8 Append to nonexistent string

stdout:
stderr: 
    local a+=a
          ^~~
[ stdin ]:2: fatal: += not allowed in assignment builtin
osh_.py8 Append to nonexistent string

stdout:
stderr: 
    local a+=a
          ^~~
[ stdin ]:2: fatal: += not allowed in assignment builtin
osh_.cc8 Append to nonexistent string

stdout:
stderr: 
    local a+=a
    ^~~~~
[ stdin ]:2: fatal: += not allowed in assignment builtin

dumb_alloc:
	gNumNew = 2027
	gNumDelete = 175
	gMemPos = 70176

	gNumMalloc = 90
	gNumFree = 0
	gMemPos2 = 10016
osh_.cc9 Append to nonexistent array is allowed

[osh_.cc status] Expected 0, got 255

stdout:
['c', 'd']
stderr:
dumb_alloc:
	gNumNew = 1859
	gNumDelete = 134
	gMemPos = 64256

	gNumMalloc = 83
	gNumFree = 0
	gMemPos2 = 9904