Results for array-compat.test.sh

statusoshosh_.pyosh_.cc
pass 773
ok 333
FAIL 004
total101010
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL Assignment Causes Array Decay
details
1pass pass FAIL Array Decay with IFS
details
2pass pass FAIL User arrays decay
details
3ok ok ok $array is not valid in OSH, is ${array[0]} in ksh/bash
detailsdetailsdetails
4ok ok ok ${array} is not valid in OSH, is ${array[0]} in ksh/bash
detailsdetailsdetails
5pass pass pass Assign to array index without initialization
6pass pass pass a[40] grows array
7pass pass pass array decays to string when comparing with [[ a = b ]]
8ok ok ok ++ on a whole array increments the first element (disallowed in OSH)
detailsdetailsdetails
9pass pass FAIL Apply vectorized operations on ${a[*]}
details
17 passed, 9 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc0 Assignment Causes Array Decay

[osh_.cc stdout] Expected "['[x', 'y', 'z]']\n['[x y z]']\n", got "['[x y z]']\n['[x', 'y', 'z]']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['[x y z]']
['[x', 'y', 'z]']
stderr:
dumb_alloc:
	gNumNew = 2145
	gNumDelete = 201
	gMemPos = 72528

	gNumMalloc = 159
	gNumFree = 0
	gMemPos2 = 11120
osh_.cc1 Array Decay with IFS

[osh_.cc status] Expected 0, got 255

stdout:
['[x y z]']
stderr:
dumb_alloc:
	gNumNew = 2066
	gNumDelete = 175
	gMemPos = 70416

	gNumMalloc = 127
	gNumFree = 0
	gMemPos2 = 10608
osh_.cc2 User arrays decay

[osh_.cc stdout] Expected "['x', 'y', 'z']\n['x y z']\n['x', 'YYY', 'z']\n", got "['x', 'y', 'z']\n['x', 'YYY', 'z']\n['x y z']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['x', 'y', 'z']
['x', 'YYY', 'z']
['x y z']
stderr:
dumb_alloc:
	gNumNew = 2416
	gNumDelete = 244
	gMemPos = 80640

	gNumMalloc = 215
	gNumFree = 0
	gMemPos2 = 12016
osh3 $array is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo $a
       ^~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh_.py3 $array is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo $a
       ^~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh_.cc3 $array is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo $a
  ^~~~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)

dumb_alloc:
	gNumNew = 1799
	gNumDelete = 119
	gMemPos = 62176

	gNumMalloc = 66
	gNumFree = 0
	gMemPos2 = 9632
osh4 ${array} is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo ${a}
       ^~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh_.py4 ${array} is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo ${a}
       ^~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)
osh_.cc4 ${array} is not valid in OSH, is ${array[0]} in ksh/bash

stdout:
stderr: 
  echo ${a}
  ^~~~
[ stdin ]:2: fatal: Array 'a' can't be referred to as a scalar (without @ or *)

dumb_alloc:
	gNumNew = 1803
	gNumDelete = 120
	gMemPos = 62272

	gNumMalloc = 67
	gNumFree = 0
	gMemPos2 = 9648
osh8 ++ on a whole array increments the first element (disallowed in OSH)

stdout:
stderr: 
  (( a++ ))  # doesn't make sense
     ^
[ stdin ]:2: fatal: Expected a value convertible to integer, got value.MaybeStrArray
osh_.py8 ++ on a whole array increments the first element (disallowed in OSH)

stdout:
stderr: 
  (( a++ ))  # doesn't make sense
     ^
[ stdin ]:2: fatal: Expected a value convertible to integer, got value.MaybeStrArray
osh_.cc8 ++ on a whole array increments the first element (disallowed in OSH)

stdout:
stderr: 
  (( a++ ))  # doesn't make sense
  ^~
[ stdin ]:2: fatal: Expected a value convertible to integer, got value.MaybeStrArray

dumb_alloc:
	gNumNew = 1765
	gNumDelete = 113
	gMemPos = 61664

	gNumMalloc = 54
	gNumFree = 0
	gMemPos2 = 9456
osh_.cc9 Apply vectorized operations on ${a[*]}

[osh_.cc status] Expected 0, got 255

stdout:
['x- y-y z-']
stderr:
dumb_alloc:
	gNumNew = 1906
	gNumDelete = 150
	gMemPos = 65392

	gNumMalloc = 94
	gNumFree = 0
	gMemPos2 = 10080