Results for var-op-bash.test.sh

statusbashosh
pass 2217
ok 32
BUG 20
FAIL 08
total2727
casebashoshdescription
0pass pass Lower Case with , and ,,
1pass pass Upper Case with ^ and ^^
2pass FAIL Case folding - Unicode characters
details
3BUG FAIL Case folding - multi code point
detailsdetails
4ok ok Case folding that depends on locale (not enabled, requires Turkish locale)
detailsdetails
5pass FAIL Lower Case with constant string (VERY WEIRD)
details
6pass FAIL Lower Case glob
details
7pass FAIL ${x@u} U L - upper / lower case (bash 5.1 feature)
details
8pass pass ${x@Q}
9pass ok ${array@Q} and ${array[@]@Q}
details
10pass pass ${!prefix@} ${!prefix*} yields sorted array of var names
11pass pass ${!prefix@} matches var name (regression)
12pass pass ${var@a} for attributes
13pass pass ${var@a} error conditions
14pass pass undef and @P @Q @a
15pass FAIL argv array and @P @Q @a
details
16pass pass assoc array and @P @Q @a
17pass FAIL ${!var[@]@X}
details
18pass pass ${#var@X} is a parse error
19BUG pass ${!A@a} and ${!A[@]@a}
details
20pass FAIL undef vs. empty string in var ops
details
21pass pass -o nounset with var ops
22pass pass ${a[0]@a} and ${a@a}
23pass pass ${!r@a} with r='a[0]' (attribute for indirect expansion of an array element)
24ok pass Array expansion with nullary var op @Q
details
25ok pass Array expansion with nullary var op @P
details
26pass pass Array expansion with nullary var op @a
39 passed, 5 OK, 0 not implemented, 2 BUG, 8 failed, 0 timeouts, 0 cases skipped
8 failed under osh

Details on runs that didn't PASS

osh2 Case folding - 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:
bash3 Case folding - multi code point

stdout:
shell
u ß
U ß
l ß
L ß

python2
ß
ß

stderr:
osh3 Case folding - multi code point

[osh stdout] Expected '', got 'shell\nu \xc3\x9f\nU \xc3\x9f\nl \xc3\x9f\nL \xc3\x9f\n\npython2\n\xc3\x9f\n\xc3\x9f\n\n'

stdout:
shell
u ß
U ß
l ß
L ß

python2
ß
ß

stderr:
bash4 Case folding that depends on locale (not enabled, requires Turkish locale)

stdout:
u I
U I
l i
L i
stderr:
osh4 Case folding that depends on locale (not enabled, requires Turkish locale)

stdout:
u I
U I
l i
L i
stderr:
osh5 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
osh6 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/uke/oil/bin/oils_for_unix.py", line 202, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1213, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2098, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1897, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1624, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 851, in _DoSimple
    allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2453, in EvalWordSequence2
    self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)
  File "/home/uke/oil/osh/word_eval.py", line 1922, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1830, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/uke/oil/osh/word_eval.py", line 1587, in _EvalBracedVarSub
    val = self._ApplyUnarySuffixOp(val, op)
  File "/home/uke/oil/osh/word_eval.py", line 964, in _ApplyUnarySuffixOp
    has_extglob)
  File "/home/uke/oil/osh/string_ops.py", line 441, in DoUnarySuffixOp
    raise NotImplementedError(ui.PrettyId(id_))
NotImplementedError: Id.VOp1_Comma
osh7 ${x@u} U L - upper / lower case (bash 5.1 feature)

[osh stdout] Expected 'Abc DEF\nABC DEF\nabc def\n', got ''
[osh status] Expected 0, got 2

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

stdout:
x $'y\\nz'
x
x
stderr:
osh15 argv array and @P @Q @a

[osh stdout] Expected "a b c\nstatus=0\n'a' 'b\\nc'\nstatus=0\n\nstatus=0\n" Got "a b c\nstatus=0\na $'b\\\\nc'\nstatus=0\na a a\nstatus=0\n"

stdout:
a b c
status=0
a $'b\\nc'
status=0
a a a
status=0
stderr:
osh17 ${!var[@]@X}

[osh stdout] Expected "fail\n'x y'\na\n", got '\n\n\n'

stdout:


stderr:
bash19 ${!A@a} and ${!A[@]@a}

stdout:
x=
invalid=
stderr:
osh20 undef vs. empty string in var ops

[osh stdout] Expected "'x' '' 'x'\n'x' '' 'x'\n'x' '' 'x'\nx='x' empty='' x='x'\nr r\n" Got "x '' x\n"
[osh status] Expected 0, got 2

stdout:
x '' x
stderr:
  echo ${x@K} ${empty@K} ${undef@K} ${x@K}
          ^
[ stdin ]:6: Unexpected token in ${} (VOp3)
bash24 Array expansion with nullary var op @Q

stdout:
["'1'", "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'"]
["'1' '2' '3' '4' '5' '6' '7' '8' '9'"]
["'ysh'", "'osh'", "'world'", "'hello'"]
["'ysh' 'osh' 'world' 'hello'"]
[]
['']
stderr:
bash25 Array expansion with nullary var op @P

stdout:
['1', '2', '3', '4', '5', '6', '7', '8', '9']
['1 2 3 4 5 6 7 8 9']
['ysh', 'osh', 'world', 'hello']
['ysh osh world hello']
[]
['']
stderr: