Results for ble-idioms.test.sh

statusoshosh-cpp
pass 1921
FAIL 75
total2626
caseoshosh-cppdescription
0pass pass recursive arith: one level
1pass pass recursive arith: two levels
2pass pass recursive arith: short circuit &&, ||
3pass pass recursive arith: short circuit ?:
4pass pass recursive arith: side effects
5pass pass recursive arith: recursion
6pass pass recursive arith: array elements
7pass pass dynamic arith varname: assign
8pass pass dynamic arith varname: read
9pass pass dynamic arith varname: copy/add
10pass pass is-array with ${var@a}
11pass pass Sparse array with big index
12FAIL pass shift unshift reverse
details
13pass pass shopt -u expand_aliases and eval
14FAIL FAIL Issue #1069 [40] BUG: a=(declare v); "${a[@]}" fails
detailsdetails
15pass pass Issue #1069 [40] BUG: a=declare; "$a" v=1 fails
16pass pass Issue #1069 [49] BUG: \return 0 does not work
17pass pass Issue #1069 [49] BUG: \return 0 does not work (other variations)
18pass pass Issue #1069 [52] BUG: \builtin local v=1 fails
19FAIL FAIL Issue #1069 [53] BUG: a[1 + 1]=2, etc. fails
detailsdetails
20FAIL FAIL Issue #1069 [53] - LHS array parsing a[1 + 2]=3 (see spec/array-assign for more)
detailsdetails
21pass pass Issue #1069 [56] BUG: declare -p unset does not print any error message
22pass pass Issue #1069 [57] BUG: variable v is invisible after IFS= eval 'local v=...'
23FAIL pass Issue #1069 [57] - Variable v should be visible after IFS= eval 'local v=...'
details
24FAIL FAIL Issue #1069 [59] N-I: arr=s should set RHS to arr[0]
detailsdetails
25FAIL FAIL Issue #1069 [59] - Assigning Str to BashArray/BashAssoc should not remove BashArray/BashAssoc
detailsdetails
40 passed, 0 OK, 0 not implemented, 0 BUG, 7 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

osh12 shift unshift reverse

[osh stdout] Expected '1 2 3 4 5 6\n2 3 4 5 6\n4 5 6\n---\n99 4 5 6\n---\n6 5 4 99\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 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2491, in ParseCommand
    return self.ParseKshFunctionDef()
  File "/home/uke/oil/osh/cmd_parse.py", line 2217, in ParseKshFunctionDef
    func.body = self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2073, in ParseCompoundCommand
    n1 = self.ParseBraceGroup()
  File "/home/uke/oil/osh/cmd_parse.py", line 1365, in ParseBraceGroup
    c_list = self._ParseCommandList()
  File "/home/uke/oil/osh/cmd_parse.py", line 2823, in _ParseCommandList
    return self._ParseCommandTerm()
  File "/home/uke/oil/osh/cmd_parse.py", line 2760, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    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
osh14 Issue #1069 [40] BUG: a=(declare v); "${a[@]}" fails

[osh stdout] Expected 'v=1\n' Got 'COMP_WORDBREAKS=$\' \\t\\n"\\\'><=;|&(:\'\nEUID=1000\nHOSTNAME=73ba70eca0ce\nIFS=$\' \\t\\n\'\nLC_ALL=C.UTF-8\nLOCALE_ARCHIVE=\'\'\nOILS_GC_ON_EXIT=1\nOPTIND=1\nOSTYPE=linux\nPATH=\'/home/uke/oil/spec/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\'\nPPID=6663\nPS4=\'${SHX_indent}${SHX_punct}${SHX_pid_str} \'\nPWD=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh\nPYTHONPATH=\'/home/uke/oil:/home/uke/oil/vendor\'\nREPO_ROOT=/home/uke/oil\nSH=/home/uke/oil/bin/osh\nSHELLOPTS=hashall\nTMP=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh\nUID=1000\na=(typeset \'v=1\')\nv=x\nv=x\n'

stdout:
COMP_WORDBREAKS=$' \t\n"\'><=;|&(:'
EUID=1000
HOSTNAME=73ba70eca0ce
IFS=$' \t\n'
LC_ALL=C.UTF-8
LOCALE_ARCHIVE=''
OILS_GC_ON_EXIT=1
OPTIND=1
OSTYPE=linux
PATH='/home/uke/oil/spec/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID=6663
PS4='${SHX_indent}${SHX_punct}${SHX_pid_str} '
PWD=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh
PYTHONPATH='/home/uke/oil:/home/uke/oil/vendor'
REPO_ROOT=/home/uke/oil
SH=/home/uke/oil/bin/osh
SHELLOPTS=hashall
TMP=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh
UID=1000
a=(typeset 'v=1')
v=x
v=x
stderr:
osh-cpp14 Issue #1069 [40] BUG: a=(declare v); "${a[@]}" fails

[osh-cpp stdout] Expected 'v=1\n' Got 'COLUMNS=80\nCOMP_WORDBREAKS=$\' \\t\\n"\\\'><=;|&(:\'\nEUID=1000\nHOSTNAME=73ba70eca0ce\nIFS=$\' \\t\\n\'\nLC_ALL=C.UTF-8\nLINES=24\nLOCALE_ARCHIVE=\'\'\nOILS_GC_ON_EXIT=1\nOPTIND=1\nOSTYPE=Linux\nPATH=\'/home/uke/oil/spec/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\'\nPPID=6679\nPS4=\'${SHX_indent}${SHX_punct}${SHX_pid_str} \'\nPWD=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh-cpp\nREPO_ROOT=/home/uke/oil\nSH=/home/uke/oil/_bin/cxx-asan/osh\nSHELLOPTS=hashall\nTMP=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh-cpp\nUID=1000\na=(typeset \'v=1\')\nv=x\nv=x\n'

stdout:
COLUMNS=80
COMP_WORDBREAKS=$' \t\n"\'><=;|&(:'
EUID=1000
HOSTNAME=73ba70eca0ce
IFS=$' \t\n'
LC_ALL=C.UTF-8
LINES=24
LOCALE_ARCHIVE=''
OILS_GC_ON_EXIT=1
OPTIND=1
OSTYPE=Linux
PATH='/home/uke/oil/spec/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/home/uke/oil/../oils.DEPS/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID=6679
PS4='${SHX_indent}${SHX_punct}${SHX_pid_str} '
PWD=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh-cpp
REPO_ROOT=/home/uke/oil
SH=/home/uke/oil/_bin/cxx-asan/osh
SHELLOPTS=hashall
TMP=/home/uke/oil/_tmp/spec-tmp/ble-idioms.test.sh/14-osh-cpp
UID=1000
a=(typeset 'v=1')
v=x
v=x
stderr:
osh19 Issue #1069 [53] BUG: a[1 + 1]=2, etc. fails

[osh stdout] Expected 'status=0, a[1]=hello\nstatus=0, a[2]=hello\nstatus=0, a[3]=hello\n' Got 'status=127, a[1]=x\nstatus=127, a[2]=x\nstatus=127, a[3]=x\n'

stdout:
status=127, a[1]=x
status=127, a[2]=x
status=127, a[3]=x
stderr:
  a[5&3]=hello
      ^
  a[5&3]=hello
  ^~
[ eval arg at line 5 of [ stdin ] ]:1
[ eval arg at line 5 of [ stdin ] ]:1


  eval 'a[5&3]=hello'
  ^~~~
  eval 'a[5&3]=hello'
  ^~~~
[ stdin ]:5: Command '3]=hello' not found (OILS-ERR-100)
[ stdin ]:5: Command 'a[5' not found (OILS-ERR-100)
  a[1 + 1]=hello
  ^~
[ eval arg at line 9 of [ stdin ] ]:1

  eval 'a[1 + 1]=hello'
  ^~~~
[ stdin ]:9: Command 'a[1' not found (OILS-ERR-100)
  a[1|2]=hello
  ^~
  a[1|2]=hello
      ^
[ eval arg at line 13 of [ stdin ] ]:1
[ eval arg at line 13 of [ stdin ] ]:1


  eval 'a[1|2]=hello'
  ^~~~
  eval 'a[1|2]=hello'
  ^~~~
[ stdin ]:13: Command '2]=hello' not found (OILS-ERR-100)
[ stdin ]:13: Command 'a[1' not found (OILS-ERR-100)
osh-cpp19 Issue #1069 [53] BUG: a[1 + 1]=2, etc. fails

[osh-cpp stdout] Expected 'status=0, a[1]=hello\nstatus=0, a[2]=hello\nstatus=0, a[3]=hello\n' Got 'status=127, a[1]=x\nstatus=127, a[2]=x\nstatus=127, a[3]=x\n'

stdout:
status=127, a[1]=x
status=127, a[2]=x
status=127, a[3]=x
stderr:
  a[5&3]=hello
      ^
  a[5&3]=hello
  ^~
[ eval arg at line 5 of [ stdin ] ]:1

  eval 'a[5&3]=hello'
  ^~~~
[ stdin ]:5: Command '3]=hello' not found (OILS-ERR-100)
[ eval arg at line 5 of [ stdin ] ]:1

  eval 'a[5&3]=hello'
  ^~~~
[ stdin ]:5: Command 'a[5' not found (OILS-ERR-100)
  a[1 + 1]=hello
  ^~
[ eval arg at line 9 of [ stdin ] ]:1

  eval 'a[1 + 1]=hello'
  ^~~~
[ stdin ]:9: Command 'a[1' not found (OILS-ERR-100)
  a[1|2]=hello
      ^
  a[1|2]=hello
  ^~
[ eval arg at line 13 of [ stdin ] ]:1

  eval 'a[1|2]=hello'
  ^~~~
[ stdin ]:13: Command '2]=hello' not found (OILS-ERR-100)
[ eval arg at line 13 of [ stdin ] ]:1

  eval 'a[1|2]=hello'
  ^~~~
[ stdin ]:13: Command 'a[1' not found (OILS-ERR-100)
osh20 Issue #1069 [53] - LHS array parsing a[1 + 2]=3 (see spec/array-assign for more)

[osh stdout] Expected 'declare -a a=([3]="7" [7]="8" [9]="9")\ndeclare -a a=([3]="55" [7]="8" [9]="9" [41]="66")\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  a[1 + 2]=7
  ^~
[ stdin ]:3: Command 'a[1' not found (OILS-ERR-100)
  a[3|4]=8
  ^~
  a[3|4]=8
      ^
[ stdin ]:4: Command '4]=8' not found (OILS-ERR-100)
[ stdin ]:4: Command 'a[3' not found (OILS-ERR-100)
  a[(1+2)*3]=9
    ^
[ stdin ]:5: Unexpected left paren (might need a space before it)
osh-cpp20 Issue #1069 [53] - LHS array parsing a[1 + 2]=3 (see spec/array-assign for more)

[osh-cpp stdout] Expected 'declare -a a=([3]="7" [7]="8" [9]="9")\ndeclare -a a=([3]="55" [7]="8" [9]="9" [41]="66")\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  a[1 + 2]=7
  ^~
[ stdin ]:3: Command 'a[1' not found (OILS-ERR-100)
  a[3|4]=8
      ^
[ stdin ]:4: Command '4]=8' not found (OILS-ERR-100)
  a[3|4]=8
  ^~
[ stdin ]:4: Command 'a[3' not found (OILS-ERR-100)
  a[(1+2)*3]=9
    ^
[ stdin ]:5: Unexpected left paren (might need a space before it)
osh23 Issue #1069 [57] - Variable v should be visible after IFS= eval 'local v=...'

[osh stdout] Expected 'v=hello\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 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2521, in ParseCommand
    return self.ParseFunctionDef()  # f() { echo; }  # function
  File "/home/uke/oil/osh/cmd_parse.py", line 2172, in ParseFunctionDef
    func.body = self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2073, in ParseCompoundCommand
    n1 = self.ParseBraceGroup()
  File "/home/uke/oil/osh/cmd_parse.py", line 1365, in ParseBraceGroup
    c_list = self._ParseCommandList()
  File "/home/uke/oil/osh/cmd_parse.py", line 2823, in _ParseCommandList
    return self._ParseCommandTerm()
  File "/home/uke/oil/osh/cmd_parse.py", line 2760, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    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
osh24 Issue #1069 [59] N-I: arr=s should set RHS to arr[0]

[osh stdout] Expected "['v', '2', '3']\n" Got "['v']\n"

stdout:
['v']
stderr:
osh-cpp24 Issue #1069 [59] N-I: arr=s should set RHS to arr[0]

[osh-cpp stdout] Expected "['v', '2', '3']\n" Got "['v']\n"

stdout:
['v']
stderr:
osh25 Issue #1069 [59] - Assigning Str to BashArray/BashAssoc should not remove BashArray/BashAssoc

[osh stdout] Expected 'declare -a a=([0]="99" [1]="2" [2]="3")\ndeclare -A A=([0]="99" [k]="v" )\n' Got 'declare -- a=99\ndeclare -- A=99\n'

stdout:
declare -- a=99
declare -- A=99
stderr:
osh-cpp25 Issue #1069 [59] - Assigning Str to BashArray/BashAssoc should not remove BashArray/BashAssoc

[osh-cpp stdout] Expected 'declare -a a=([0]="99" [1]="2" [2]="3")\ndeclare -A A=([0]="99" [k]="v" )\n' Got 'declare -- a=99\ndeclare -- A=99\n'

stdout:
declare -- a=99
declare -- A=99
stderr: