Results for var-op-bash.test.sh

statusoshosh-cpp
pass 1717
ok 22
FAIL 88
total2727
caseoshosh-cppdescription
0pass pass Lower Case with , and ,,
1pass pass Upper Case with ^ and ^^
2FAIL FAIL Case folding - Unicode characters
detailsdetails
3FAIL FAIL Case folding - multi code point
detailsdetails
4ok ok Case folding that depends on locale (not enabled, requires Turkish locale)
detailsdetails
5FAIL FAIL Lower Case with constant string (VERY WEIRD)
detailsdetails
6FAIL FAIL Lower Case glob
detailsdetails
7FAIL FAIL ${x@u} U L - upper / lower case (bash 5.1 feature)
detailsdetails
8FAIL FAIL ${x@Q}
detailsdetails
9ok ok ${array@Q} and ${array[@]@Q}
detailsdetails
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
15FAIL FAIL argv array and @P @Q @a
detailsdetails
16pass pass assoc array and @P @Q @a
17pass pass ${!var[@]@X}
18pass pass ${#var@X} is a parse error
19pass pass ${!A@a} and ${!A[@]@a}
20FAIL FAIL undef vs. empty string in var ops
detailsdetails
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)
24pass pass Array expansion with nullary var op @Q
25pass pass Array expansion with nullary var op @P
26pass pass Array expansion with nullary var op @a
34 passed, 4 OK, 0 not implemented, 0 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:
osh-cpp2 Case folding - 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 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:
osh-cpp3 Case folding - multi code point

[osh-cpp 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:
osh4 Case folding that depends on locale (not enabled, requires Turkish locale)

stdout:
u I
U I
l i
L i
stderr:
osh-cpp4 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
osh-cpp5 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
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 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 401, in Batch2
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2365, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 2164, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1891, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1076, in _DoSimple
    allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2506, in EvalWordSequence2
    self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)
  File "/home/uke/oil/osh/word_eval.py", line 1993, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1901, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/uke/oil/osh/word_eval.py", line 1663, in _EvalBracedVarSub
    val = self._ApplyUnarySuffixOp(val, op)
  File "/home/uke/oil/osh/word_eval.py", line 995, in _ApplyUnarySuffixOp
    has_extglob)
  File "/home/uke/oil/osh/string_ops.py", line 450, in DoUnarySuffixOp
    raise NotImplementedError(ui.PrettyId(id_))
NotImplementedError: Id.VOp1_Comma
osh-cpp6 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:43894: BigStr* string_ops::DoUnarySuffixOp(BigStr*, syntax_asdl::Token*, BigStr*, bool): Assertion `false' failed.
timeout: the monitored command dumped core
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)
osh-cpp7 ${x@u} U L - upper / lower case (bash 5.1 feature)

[osh-cpp stdout] Expected 'Abc DEF\nABC DEF\nabc def\n' Got ''
[osh-cpp status] Expected 0 Got 2

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

[osh stdout] Expected 'OK\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 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2835, in ParseLogicalLine
    self._NewlineOk()
  File "/home/uke/oil/osh/cmd_parse.py", line 712, in _NewlineOk
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 670, in _GetWord
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2329, in ReadWord
    w = self._ReadWord(word_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2246, in _ReadWord
    return self._ReadCompoundOrRedir(lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 1894, in _ReadCompoundOrRedir
    return self._ReadCompoundOrRedir3(lex_mode, Id.Undefined_Tok, True)
  File "/home/uke/oil/osh/word_parse.py", line 1999, in _ReadCompoundOrRedir3
    part = self._ReadUnquotedLeftParts(is_triple_quoted)
  File "/home/uke/oil/osh/word_parse.py", line 910, in _ReadUnquotedLeftParts
    dq_part = self._ReadDoubleQuoted(self.cur_token)
  File "/home/uke/oil/osh/word_parse.py", line 1191, in _ReadDoubleQuoted
    self._ReadLikeDQ(left_token, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1102, in _ReadLikeDQ
    part = word_part.EscapedLiteral(tok, "\"")
UnboundLocalError: local variable 'tok' referenced before assignment
osh-cpp8 ${x@Q}

[osh-cpp stdout] Expected 'OK\n' Got ''
[osh-cpp status] Expected 0 Got 1

stdout:
stderr: 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==27263==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x5637146422d7 bp 0x7ffdb714e940 sp 0x7ffdb714e920 T0)
==27263==The signal is caused by a READ memory access.
==27263==Hint: address points to the zero page.
    #0 0x5637146422d7 in lexer::TokenSliceLeft(syntax_asdl::Token*, int) _gen/bin/oils_for_unix.mycpp.cc:32743
    #1 0x5637146a3f48 in word_::_EvalWordPart(syntax_asdl::word_part_t*) _gen/bin/oils_for_unix.mycpp.cc:44238
    #2 0x5637146a40d8 in word_::_EvalWordPart(syntax_asdl::word_part_t*) _gen/bin/oils_for_unix.mycpp.cc:44252
    #3 0x5637146a465c in word_::StaticEval(syntax_asdl::word_t*) _gen/bin/oils_for_unix.mycpp.cc:44327
    #4 0x563714678a8a in cmd_parse::CommandParser::_ScanSimpleCommand() _gen/bin/oils_for_unix.mycpp.cc:39059
    #5 0x56371467a92a in cmd_parse::CommandParser::ParseSimpleCommand() _gen/bin/oils_for_unix.mycpp.cc:39237
    #6 0x56371468a3c6 in cmd_parse::CommandParser::ParseCommand() _gen/bin/oils_for_unix.mycpp.cc:40519
    #7 0x56371468a97f in cmd_parse::CommandParser::ParsePipeline() _gen/bin/oils_for_unix.mycpp.cc:40545
    #8 0x56371468b1ce in cmd_parse::CommandParser::_ParseAndOr() _gen/bin/oils_for_unix.mycpp.cc:40594
    #9 0x56371468afd0 in cmd_parse::CommandParser::ParseAndOr() _gen/bin/oils_for_unix.mycpp.cc:40583
    #10 0x56371468b8b8 in cmd_parse::CommandParser::_ParseCommandLine() _gen/bin/oils_for_unix.mycpp.cc:40629
    #11 0x56371468cc3c in cmd_parse::CommandParser::ParseLogicalLine() _gen/bin/oils_for_unix.mycpp.cc:40744
    #12 0x5637146031b4 in main_loop::Batch2(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:25312
    #13 0x563714602edf in main_loop::Batch(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:25287
    #14 0x563714723fc3 in shell::Main(BigStr*, args::Reader*, Dict<BigStr*, BigStr*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*, bool) _gen/bin/oils_for_unix.mycpp.cc:58129
    #15 0x5637145815c8 in oils_for_unix::AppBundleMain(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:11527
    #16 0x563714581a42 in oils_for_unix::main(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:11559
    #17 0x56371455f88d in main (/home/uke/oil/_bin/cxx-asan/bin/oils_for_unix.mycpp+0x13888d)
    #18 0x7fb695687249  (/lib/x86_64-linux-gnu/libc.so.6+0x27249)
    #19 0x7fb695687304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304)
    #20 0x56371455eff0 in _start (/home/uke/oil/_bin/cxx-asan/bin/oils_for_unix.mycpp+0x137ff0)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV _gen/bin/oils_for_unix.mycpp.cc:32743 in lexer::TokenSliceLeft(syntax_asdl::Token*, int)
==27263==ABORTING
osh9 ${array@Q} and ${array[@]@Q}

stdout:
x $'y\\nz'
x
x
stderr:
osh-cpp9 ${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:
osh-cpp15 argv array and @P @Q @a

[osh-cpp 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:
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)
osh-cpp20 undef vs. empty string in var ops

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

stdout:
x '' x
stderr:
  echo ${x@K} ${empty@K} ${undef@K} ${x@K}
          ^
[ stdin ]:6: Unexpected token in ${} (VOp3)