Results for var-ref.test.sh

statusoshosh_.pyosh_.cc
pass 887
ok 111
N-I 111
FAIL 334
total131313
caseoshosh_.pyosh_.ccdescription
0pass pass pass var ref ${!a}
1pass pass pass ref to $@ with @
2pass pass pass ref to $1 and $2 with 1 and 2
3FAIL FAIL FAIL var ref with 1 and @ and *
detailsdetailsdetails
4pass pass pass var ref to special var BASH_SOURCE
5N-I N-I N-I var ref to $? with '?' (not in Oil)
detailsdetailsdetails
6FAIL FAIL FAIL indirection, *then* fancy expansion features
detailsdetailsdetails
7FAIL FAIL FAIL indirection *to* an array reference
detailsdetailsdetails
8pass pass FAIL indirection to nasty complex array references
details
9pass pass pass indirection *to* fancy expansion features bash disallows
10ok ok ok Bad var ref with ${!a}
detailsdetailsdetails
11pass pass pass ${!OPTIND} (used by bash completion
12pass pass pass ${!ref-default}
23 passed, 3 OK, 3 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh3 var ref with 1 and @ and *

[osh stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n'

stdout:
|x|
|x|y|
|x|y|
stderr:
osh_.py3 var ref with 1 and @ and *

[osh_.py stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n'

stdout:
|x|
|x|y|
|x|y|
stderr:
osh_.cc3 var ref with 1 and @ and *

[osh_.cc stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n'

stdout:
|x|
|x|y|
|x|y|
stderr:
osh5 var ref to $? with '?' (not in Oil)

stdout:
myfunc
stderr:
    echo ${!ref}
            ^~~
[ stdin ]:3: fatal: Bad indirect expansion: '?'
osh_.py5 var ref to $? with '?' (not in Oil)

stdout:
myfunc
stderr:
    echo ${!ref}
            ^~~
[ stdin ]:3: fatal: Bad indirect expansion: '?'
osh_.cc5 var ref to $? with '?' (not in Oil)

stdout:
myfunc
stderr:
    echo ${!ref}
    ^~~~
[ stdin ]:3: fatal: Bad indirect expansion: '?'
osh6 indirection, *then* fancy expansion features

[osh stdout] Expected 'ok\n', got "${!b[1]} -> expected asdf, got asdf x\n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad err msg: ${!w:?oops} -> ${!w:?oops}\n ^\n[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'\n${!x^a} -> expected Aaabcc, got \nok\n"

stdout:
${!b[1]} -> expected asdf, got asdf x
$zz -> expected foo, got 
bar vs foo
$zz -> expected foo, got 
bad err msg: ${!w:?oops} ->   ${!w:?oops}
     ^
[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'
${!x^a} -> expected Aaabcc, got 
ok
stderr:
  echo "${!x^a}"
  ^~~~
[ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument
osh_.py6 indirection, *then* fancy expansion features

[osh_.py stdout] Expected 'ok\n', got "${!b[1]} -> expected asdf, got asdf x\n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad err msg: ${!w:?oops} -> ${!w:?oops}\n ^\n[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'\n${!x^a} -> expected Aaabcc, got \nok\n"

stdout:
${!b[1]} -> expected asdf, got asdf x
$zz -> expected foo, got 
bar vs foo
$zz -> expected foo, got 
bad err msg: ${!w:?oops} ->   ${!w:?oops}
     ^
[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'
${!x^a} -> expected Aaabcc, got 
ok
stderr:
  echo "${!x^a}"
  ^~~~
[ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument
osh_.cc6 indirection, *then* fancy expansion features

[osh_.cc stdout] Expected 'ok\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh7 indirection *to* an array reference

[osh stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n'

stdout:
.
.x
.x.y
.x.y
stderr:
osh_.py7 indirection *to* an array reference

[osh_.py stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n'

stdout:
.
.x
.x.y
.x.y
stderr:
osh_.cc7 indirection *to* an array reference

[osh_.cc stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n'

stdout:
.
.x
.x.y
.x.y
stderr:
osh_.cc8 indirection to nasty complex array references

[osh_.cc stdout] Expected '1 end\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh10 Bad var ref with ${!a}

stdout:
stderr: 
  echo ref ${!a}
              ^
[ stdin ]:2: fatal: Bad indirect expansion: 'bad var name'
osh_.py10 Bad var ref with ${!a}

stdout:
stderr: 
  echo ref ${!a}
              ^
[ stdin ]:2: fatal: Bad indirect expansion: 'bad var name'
osh_.cc10 Bad var ref with ${!a}

stdout:
stderr: 
  echo ref ${!a}
  ^~~~
[ stdin ]:2: fatal: Bad indirect expansion: 'bad var name'