Results for var-ref.test.sh

casebashmkshoshosh-byterundescription
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-byterun1 var ref with special vars

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

stdout:
myfunc

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

stdout:
a b
stderr:
_tmp/spec-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-byterun2 declare -n and ${!a}

[osh-byterun 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: 
*** Error has no source location info ***
osh failed: Can't index string 'array' with integer
osh-byterun4 pass array by reference

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

stdout:
stderr: 
*** Error has no source location info ***
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'
*** Error has no source location info ***
osh failed: Can't index string 'array' with integer
osh-byterun5 pass assoc array by reference

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

stdout:
stderr: 
osh warning: Invalid integer constant 'sunday'
*** Error has no source location info ***
osh failed: Can't index string 'array' with integer
mksh6 pass local array by reference, relying on DYNAMIC SCOPING

stdout:
stderr: 
_tmp/spec-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: 
*** Error has no source location info ***
osh failed: Can't index string 'array' with integer
osh-byterun6 pass local array by reference, relying on DYNAMIC SCOPING

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

stdout:
stderr: 
*** Error has no source location info ***
osh failed: Can't index string 'array' with integer