Results for var-ref.test.sh

casebashmkshoshosh_ALTdescription
0pass BUG pass pass var ref ${!a}
details
1pass N-I FAIL FAIL var ref with special vars
detailsdetailsdetails
2pass N-I FAIL FAIL declare -n and ${!a}
detailsdetailsdetails
3pass BUG pass pass Bad var ref with ${!a}
details
4pass pass FAIL FAIL pass array by reference
detailsdetails
5pass BUG FAIL FAIL pass assoc array by reference
detailsdetailsdetails
6pass BUG FAIL FAIL pass local array by reference, relying on DYNAMIC SCOPING
detailsdetailsdetails

12 passed, 0 ok, 2 known unimplemented, 4 known bugs, 5 failed, 0 skipped

Details on runs that didn't PASS

mksh0 var ref ${!a}

stdout:
ref a b
stderr:
mksh1 var ref with special vars

stdout:
ref
ref
stderr:
osh1 var ref with special vars

[osh stdout] Expected u'myfunc\n0\n', got 'myfunc\n\n'

stdout:
myfunc

stderr:
osh_ALT1 var ref with special vars

[osh_ALT stdout] Expected u'myfunc\n0\n', got 'myfunc\n\n'

stdout:
myfunc

stderr:
mksh2 declare -n and ${!a}

stdout:
a b
stderr:
/bin/mksh: <stdin>[1]: declare: not found
osh2 declare -n and ${!a}

[osh stdout] Expected 'b c\n', got 'c b\n'

stdout:
c b
stderr:
osh_ALT2 declare -n and ${!a}

[osh_ALT stdout] Expected 'b c\n', got 'c b\n'

stdout:
c b
stderr:
mksh3 Bad var ref with ${!a}

stdout:
ref a
status=0
stderr:
osh4 pass array by reference

[osh stdout] Expected 'zo\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer
osh_ALT4 pass array by reference

[osh_ALT stdout] Expected 'zo\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer
mksh5 pass assoc array by reference

stdout:
[monday]=eggs
stderr:
osh5 pass assoc array by reference

[osh stdout] Expected 'jam\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
osh warning: Invalid integer constant 'sunday'
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer
osh_ALT5 pass assoc array by reference

[osh_ALT stdout] Expected 'jam\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
osh warning: Invalid integer constant 'sunday'
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer
mksh6 pass local array by reference, relying on DYNAMIC SCOPING

stdout:
stderr: 
/bin/mksh: <stdin>[7]: syntax error: '(' unexpected
osh6 pass local array by reference, relying on DYNAMIC SCOPING

[osh stdout] Expected 'zo\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer
osh_ALT6 pass local array by reference, relying on DYNAMIC SCOPING

[osh_ALT stdout] Expected 'zo\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
Line 0 of '<unknown>'
  <no position info for token>
osh failed: Can't index string 'array' with integer