Results for var-op-bash.test.sh

statusoshosh_.pyosh_.cc
pass 875
ok 511
FAIL 3810
total161616
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL Lower Case with , and ,,
details
1pass pass FAIL Upper Case with ^ and ^^
details
2FAIL FAIL FAIL Lower Case with constant string (VERY WEIRD)
detailsdetailsdetails
3FAIL FAIL FAIL Lower Case glob
detailsdetailsdetails
4pass pass pass ${x@Q}
5ok ok ok ${array@Q} and ${array[@]@Q}
detailsdetailsdetails
6pass FAIL FAIL ${!prefix@} ${!prefix*} yields sorted array of var names
detailsdetails
7pass pass pass ${!prefix@} matches var name (regression)
8pass pass pass ${var@a} for attributes
9pass pass pass ${var@a} error conditions
10ok FAIL FAIL undef and @P @Q @a
detailsdetailsdetails
11ok FAIL FAIL argv array and @P @Q @a
detailsdetailsdetails
12ok FAIL FAIL assoc array and @P @Q @a
detailsdetailsdetails
13ok FAIL FAIL ${!var[@]@X}
detailsdetailsdetails
14pass pass pass ${#var@X} is a parse error
15FAIL FAIL FAIL ${!A@a} and ${!A[@]@a}
detailsdetailsdetails
20 passed, 7 OK, 0 not implemented, 0 BUG, 21 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh_.cc0 Lower Case with , and ,,

[osh_.cc stdout] Expected 'aBC DEF\nabc def\nempty=\nempty=\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:317: Str *Str::lower(): Assertion `0' failed.
osh_.cc1 Upper Case with ^ and ^^

[osh_.cc stdout] Expected 'Abc def\nABC DEF\nempty=\nempty=\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:313: Str *Str::upper(): Assertion `0' failed.
osh2 Lower Case with constant string (VERY WEIRD)

[osh stdout] Expected 'aAA ABC DEF\naaa aBC DEF\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  echo ${x,A}
  ^~~~
[ stdin ]:2: fatal: Id.VOp1_Comma can't have an argument
osh_.py2 Lower Case with constant string (VERY WEIRD)

[osh_.py stdout] Expected 'aAA ABC DEF\naaa aBC DEF\n', got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
  echo ${x,A}
  ^~~~
[ stdin ]:2: fatal: Id.VOp1_Comma can't have an argument
osh_.cc2 Lower Case with constant string (VERY WEIRD)

[osh_.cc stdout] Expected 'aAA ABC DEF\naaa aBC DEF\n', got ''
[osh_.cc status] Expected 0, got 1

stdout:
stderr: 
  echo ${x,A}
  ^~~~
[ stdin ]:2: fatal: Id.VOp1_Comma can't have an argument
osh3 Lower Case glob

[osh stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
FATAL: NotImplementedError('Id.VOp1_Comma',)
osh_.py3 Lower Case glob

[osh_.py stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
osh fatal error: Id.VOp1_Comma
osh_.cc3 Lower Case glob

[osh_.cc stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'NotImplementedError*'
osh5 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
stderr:
  echo ${array@Q}
       ^~
[ stdin ]:6: fatal: Array 'array' can't be referred to as a scalar (without @ or *)
osh_.py5 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
stderr:
  echo ${array@Q}
       ^~
[ stdin ]:6: fatal: Array 'array' can't be referred to as a scalar (without @ or *)
osh_.cc5 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
stderr:
  echo ${array@Q}
  ^~~~
[ stdin ]:6: fatal: Array 'array' can't be referred to as a scalar (without @ or *)
osh_.py6 ${!prefix@} ${!prefix*} yields sorted array of var names

[osh_.py stdout] Expected "['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py ${!Z*}
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
  argv.py ${!Z@}
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
  argv.py "${!Z*}"
  ^~~~~~~
[ stdin ]:8: 'argv.py' not found
  argv.py "${!Z@}"
  ^~~~~~~
[ stdin ]:9: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z*}  ; done
                   ^~~~~~~
[ stdin ]:10: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z*}  ; done
                   ^~~~~~~
[ stdin ]:10: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z@}  ; done
                   ^~~~~~~
[ stdin ]:11: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z@}  ; done
                   ^~~~~~~
[ stdin ]:11: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z*}"; done
                   ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z*}"; done
                   ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z@}"; done
                   ^~~~~~~
[ stdin ]:13: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z@}"; done
                   ^~~~~~~
[ stdin ]:13: 'argv.py' not found
osh_.cc6 ${!prefix@} ${!prefix*} yields sorted array of var names

[osh_.cc stdout] Expected "['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z ZIP ZOO ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n['Z', 'ZIP', 'ZOO', 'ZOOM']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py ${!Z*}
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
  argv.py ${!Z@}
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
  argv.py "${!Z*}"
  ^~~~~~~
[ stdin ]:8: 'argv.py' not found
  argv.py "${!Z@}"
  ^~~~~~~
[ stdin ]:9: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z*}  ; done
                   ^~~~~~~
[ stdin ]:10: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z*}  ; done
                   ^~~~~~~
[ stdin ]:10: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z@}  ; done
                   ^~~~~~~
[ stdin ]:11: 'argv.py' not found
  for i in 1 2; do argv.py ${!Z@}  ; done
                   ^~~~~~~
[ stdin ]:11: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z*}"; done
                   ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z*}"; done
                   ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z@}"; done
                   ^~~~~~~
[ stdin ]:13: 'argv.py' not found
  for i in 1 2; do argv.py "${!Z@}"; done
                   ^~~~~~~
[ stdin ]:13: 'argv.py' not found
osh10 undef and @P @Q @a

stdout:
status=0
''
status=0

status=0
stderr:
osh_.py10 undef and @P @Q @a

[osh_.py stdout] Expected "\nstatus=0\n''\nstatus=0\n\nstatus=0\n", got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'echo ${undef@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo ${undef@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'echo ${undef@a}'
      ^~
[ stdin ]:5: '-c' not found
osh_.cc10 undef and @P @Q @a

[osh_.cc stdout] Expected "\nstatus=0\n''\nstatus=0\n\nstatus=0\n", got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'echo ${undef@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo ${undef@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'echo ${undef@a}'
      ^~
[ stdin ]:5: '-c' not found
osh11 argv array and @P @Q @a

stdout:
status=1
a $'b\\nc'
status=0
a
status=0
stderr:
  echo ${@@P}
  ^~~~
[ -c flag ]:1: fatal: Can't use @P on value.MaybeStrArray
osh_.py11 argv array and @P @Q @a

[osh_.py stdout] Expected "status=1\na $'b\\\\nc'\nstatus=0\na\nstatus=0\n", got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'echo ${@@P}' dummy a b c
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo ${@@Q}' dummy a 'b\nc'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'echo ${@@a}' dummy a b c
      ^~
[ stdin ]:5: '-c' not found
osh_.cc11 argv array and @P @Q @a

[osh_.cc stdout] Expected "status=1\na $'b\\\\nc'\nstatus=0\na\nstatus=0\n", got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'echo ${@@P}' dummy a b c
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo ${@@Q}' dummy a 'b\nc'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'echo ${@@a}' dummy a b c
      ^~
[ stdin ]:5: '-c' not found
osh12 assoc array and @P @Q @a

stdout:
status=1
status=1
A - A
status=0
stderr:
  declare -A A=(["x"]="y"); echo ${A@P} - ${A[@]@P}
                                 ^~
[ -c flag ]:1: fatal: Array 'A' can't be referred to as a scalar (without @ or *)
  declare -A A=(["x"]="y"); echo ${A@Q} - ${A[@]@Q}
                                 ^~
[ -c flag ]:1: fatal: Array 'A' can't be referred to as a scalar (without @ or *)
osh_.py12 assoc array and @P @Q @a

[osh_.py stdout] Expected 'status=1\nstatus=1\nA - A\nstatus=0\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'declare -A A=(["x"]="y"); echo ${A@P} - ${A[@]@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'declare -A A=(["x"]="y"); echo ${A@Q} - ${A[@]@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'declare -A A=(["x"]=y); echo ${A@a} - ${A[@]@a}'
      ^~
[ stdin ]:5: '-c' not found
osh_.cc12 assoc array and @P @Q @a

[osh_.cc stdout] Expected 'status=1\nstatus=1\nA - A\nstatus=0\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
  $SH -c 'declare -A A=(["x"]="y"); echo ${A@P} - ${A[@]@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'declare -A A=(["x"]="y"); echo ${A@Q} - ${A[@]@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'declare -A A=(["x"]=y); echo ${A@a} - ${A[@]@a}'
      ^~
[ stdin ]:5: '-c' not found
osh13 ${!var[@]@X}

stdout:
fail
'x y'
a
stderr:
  declare -A A=(["x"]="y"); echo ${!A[@]@P}
                            ^~~~
[ -c flag ]:1: fatal: Can't use @P on value.MaybeStrArray
osh_.py13 ${!var[@]@X}

[osh_.py stdout] Expected "fail\n'x y'\na\n", got 'fail\nfail\nfail\n'

stdout:
fail
fail
fail
stderr:
  $SH -c 'declare -A A=(["x"]="y"); echo ${!A[@]@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'declare -A A=(["x y"]="y"); echo ${!A[@]@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'declare -A A=(["x"]=y); echo ${!A[@]@a}'
      ^~
[ stdin ]:5: '-c' not found
osh_.cc13 ${!var[@]@X}

[osh_.cc stdout] Expected "fail\n'x y'\na\n", got 'fail\nfail\nfail\n'

stdout:
fail
fail
fail
stderr:
  $SH -c 'declare -A A=(["x"]="y"); echo ${!A[@]@P}'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'declare -A A=(["x y"]="y"); echo ${!A[@]@Q}'
      ^~
[ stdin ]:3: '-c' not found
  $SH -c 'declare -A A=(["x"]=y); echo ${!A[@]@a}'
      ^~
[ stdin ]:5: '-c' not found
osh15 ${!A@a} and ${!A[@]@a}

[osh stdout] Expected 'x=\nx=\n', got 'x=a\nx=a\n'

stdout:
x=a
x=a
stderr:
osh_.py15 ${!A@a} and ${!A[@]@a}

[osh_.py stdout] Expected 'x=\nx=\n', got 'x=a\nx=a\n'

stdout:
x=a
x=a
stderr:
osh_.cc15 ${!A@a} and ${!A[@]@a}

[osh_.cc stdout] Expected 'x=\nx=\n', got 'x=a\nx=a\n'

stdout:
x=a
x=a
stderr: