Results for var-op-bash.test.sh

statusoshosh-cpp
pass 88
ok 55
FAIL 55
total1818
caseoshosh-cppdescription
0pass pass Lower Case with , and ,,
1pass pass Upper Case with ^ and ^^
2FAIL FAIL Case Folding of Unicode Characters
detailsdetails
3FAIL FAIL Lower Case with constant string (VERY WEIRD)
detailsdetails
4FAIL FAIL Lower Case glob
detailsdetails
5FAIL FAIL ${x@u} U l L upper / lower case (bash 5.1 feature)
detailsdetails
6pass pass ${x@Q}
7ok ok ${array@Q} and ${array[@]@Q}
detailsdetails
8pass pass ${!prefix@} ${!prefix*} yields sorted array of var names
9pass pass ${!prefix@} matches var name (regression)
10pass pass ${var@a} for attributes
11pass pass ${var@a} error conditions
12ok ok undef and @P @Q @a
detailsdetails
13ok ok argv array and @P @Q @a
detailsdetails
14ok ok assoc array and @P @Q @a
detailsdetails
15ok ok ${!var[@]@X}
detailsdetails
16pass pass ${#var@X} is a parse error
17FAIL FAIL ${!A@a} and ${!A[@]@a}
detailsdetails
16 passed, 10 OK, 0 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

osh2 Case Folding of Unicode Characters

[osh stdout] Expected 'u \xc3\x80\xc3\x88\nU \xc3\x80\xc3\x88\nl \xc3\xa0\xc3\x88\nL \xc3\xa0\xc3\xa8\nu \xc3\x81\xc3\xa9\nU \xc3\x81\xc3\x89\nl \xc3\xa1\xc3\xa9\nL \xc3\xa1\xc3\xa9\n' Got 'u \xc3\x80\xc3\x88\nU \xc3\x80\xc3\x88\nl \xc3\x80\xc3\x88\nL \xc3\x80\xc3\x88\nu \xc3\xa1\xc3\xa9\nU \xc3\xa1\xc3\xa9\nl \xc3\xa1\xc3\xa9\nL \xc3\xa1\xc3\xa9\n'

stdout:
u ÀÈ
U ÀÈ
l ÀÈ
L ÀÈ
u áé
U áé
l áé
L áé
stderr:
osh-cpp2 Case Folding of Unicode Characters

[osh-cpp stdout] Expected 'u \xc3\x80\xc3\x88\nU \xc3\x80\xc3\x88\nl \xc3\xa0\xc3\x88\nL \xc3\xa0\xc3\xa8\nu \xc3\x81\xc3\xa9\nU \xc3\x81\xc3\x89\nl \xc3\xa1\xc3\xa9\nL \xc3\xa1\xc3\xa9\n' Got 'u \xc3\x80\xc3\x88\nU \xc3\x80\xc3\x88\nl \xc3\x80\xc3\x88\nL \xc3\x80\xc3\x88\nu \xc3\xa1\xc3\xa9\nU \xc3\xa1\xc3\xa9\nl \xc3\xa1\xc3\xa9\nL \xc3\xa1\xc3\xa9\n'

stdout:
u ÀÈ
U ÀÈ
l ÀÈ
L ÀÈ
u áé
U áé
l áé
L áé
stderr:
osh3 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-cpp3 Lower Case with constant string (VERY WEIRD)

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

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

[osh stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 195, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 170, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 1105, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 360, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1902, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1724, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1497, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 848, in _DoSimple
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2198, in EvalWordSequence2
    self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1715, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1635, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1384, in _EvalBracedVarSub
    val = self._ApplyUnarySuffixOp(val, op)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 823, in _ApplyUnarySuffixOp
    has_extglob)
  File "/home/andy/git/oilshell/oil/osh/string_ops.py", line 358, in DoUnarySuffixOp
    raise NotImplementedError(ui.PrettyId(id_))
NotImplementedError: Id.VOp1_Comma
osh-cpp4 Lower Case glob

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

stdout:
stderr: 
osh: _gen/bin/oils_for_unix.mycpp.cc:38147: BigStr* string_ops::DoUnarySuffixOp(BigStr*, syntax_asdl::Token*, BigStr*, bool): Assertion `false' failed.
timeout: the monitored command dumped core
osh5 ${x@u} U l L upper / lower case (bash 5.1 feature)

[osh status] Expected 0, got 2

stdout:
stderr: 
  echo "${x@u}"
           ^
[ stdin ]:2: Unexpected token in ${} (VOp3)
osh-cpp5 ${x@u} U l L upper / lower case (bash 5.1 feature)

[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  echo "${x@u}"
           ^
[ stdin ]:2: Unexpected token in ${} (VOp3)
osh7 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
x
stderr:
osh-cpp7 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
x
stderr:
osh12 undef and @P @Q @a

stdout:
status=0
''
status=0

status=0
stderr:
osh-cpp12 undef and @P @Q @a

stdout:
status=0
''
status=0

status=0
stderr:
osh13 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 BashArray
osh-cpp13 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 BashArray
osh14 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: Can't use @P on BashAssoc
  declare -A A=(["x"]="y"); echo ${A@Q} - ${A[@]@Q}
                                                ^~
[ -c flag ]:1: fatal: Can't use @Q on BashAssoc
osh-cpp14 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: Can't use @P on BashAssoc
  declare -A A=(["x"]="y"); echo ${A@Q} - ${A[@]@Q}
                                                ^~
[ -c flag ]:1: fatal: Can't use @Q on BashAssoc
osh15 ${!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 BashArray
osh-cpp15 ${!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 BashArray
osh17 ${!A@a} and ${!A[@]@a}

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

stdout:
x=a
stderr:
  echo x=${!A@a}
  ^~~~
[ stdin ]:3: fatal: Indirect expansion of assoc array
osh-cpp17 ${!A@a} and ${!A[@]@a}

[osh-cpp stdout] Expected 'x=\nx=\n', got 'x=a\n'
[osh-cpp status] Expected 0, got 1

stdout:
x=a
stderr:
  echo x=${!A@a}
  ^~~~
[ stdin ]:3: fatal: Indirect expansion of assoc array