Results for var-ref.test.sh

statusoshosh_.pyosh_.cc
pass 242423
ok 222
FAIL 001
total262626
caseoshosh_.pyosh_.ccdescription
0pass pass pass var ref ${!a}
1pass pass pass ${!ref-default}
2pass pass pass ${!undef:-}
3pass pass pass comparison to ${!array[@]} keys (similar SYNTAX)
4pass pass pass ${!a[@]-'default'} is illegal
5pass pass pass var ref to $@ with @
6pass pass pass var ref to $1 and $2 with 1 and 2
7pass pass pass var ref: 1, @, *
8pass pass pass var ref to special var BASH_SOURCE
9pass pass pass var ref to $? with '?'
10pass pass pass Var ref, then assignment with ${ := }
11pass pass pass Var ref, then error with ${ ? }
12pass pass FAIL Indirect expansion, THEN suffix operators
details
13pass pass pass var ref OF array var
14pass pass pass array ref without eval_unsafe_arith
15pass pass pass array ref without compat_array
16pass pass pass var ref TO array var
17pass pass pass var ref TO array var, with subscripts
18pass pass pass var ref TO assoc array a[key]
19pass pass pass var ref TO array with arbitrary subscripts
20pass pass pass Bizarre tilde expansion in array index
21pass pass pass Indirect expansion TO fancy expansion features bash disallows
22ok ok ok Bad var ref
detailsdetailsdetails
23ok ok ok Bad var ref 2
detailsdetailsdetails
24pass pass pass ${!OPTIND} (used by bash completion
25pass pass pass var ref doesn't need cycle detection
71 passed, 6 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc12 Indirect expansion, THEN suffix operators

[osh_.cc stdout] Expected 'ok\n', got '${!y:+foo} -> expected , got \n\nok\n'

stdout:
${!y:+foo} -> expected , got 

ok
stderr:
osh22 Bad var ref

stdout:
stderr: 
  bad var name
     ^
[ var 'a' at line 2 of [ stdin ] ]:1: Expected end of var ref
  echo ref ${!a}
              ^
[ stdin ]:2: fatal: Invalid var ref
osh_.py22 Bad var ref

stdout:
stderr: 
  bad var name
     ^
[ var 'a' at line 2 of [ stdin ] ]:1: Expected end of var ref
  echo ref ${!a}
              ^
[ stdin ]:2: fatal: Invalid var ref
osh_.cc22 Bad var ref

stdout:
stderr: 
  bad var name
     ^
[ var 'a' at line 2 of [ stdin ] ]:1: Expected end of var ref
  echo ref ${!a}
  ^~~~
[ stdin ]:2: fatal: Invalid var ref
osh23 Bad var ref 2

stdout:
stderr: 
  /
  ^
[ var 'b' at line 2 of [ stdin ] ]:1: Invalid var ref
  echo ref ${!b}
              ^
[ stdin ]:2: fatal: Invalid var ref
osh_.py23 Bad var ref 2

stdout:
stderr: 
  /
  ^
[ var 'b' at line 2 of [ stdin ] ]:1: Invalid var ref
  echo ref ${!b}
              ^
[ stdin ]:2: fatal: Invalid var ref
osh_.cc23 Bad var ref 2

stdout:
stderr: 
  /
  ^
[ var 'b' at line 2 of [ stdin ] ]:1: Invalid var ref
  echo ref ${!b}
  ^~~~
[ stdin ]:2: fatal: Invalid var ref