Results for explore-parsing.test.sh

casedashbashmkshoshdescription
0pass ok ok FAIL Bad env name: hyphen
detailsdetailsdetails
1pass ok ok FAIL Bad env name: period
detailsdetailsdetails
2pass pass pass pass Bad var sub
3pass ok ok FAIL Bad braced var sub -- not allowed
detailsdetailsdetails
4BUG BUG BUG FAIL Bad var sub caught at parse time
detailsdetailsdetailsdetails
5pass pass pass pass Pipe with while
6pass pass pass pass Length of length of ARGS!
7pass pass pass pass Length of length of ARGS! 2 digit
8pass pass pass FAIL $1 .. $9 are scoped, while $0 is not
details
9pass pass pass pass Chained && and || -- || has higher precedence?
10pass pass pass pass Pipeline comments
11pass pass pass pass Command block
12ok pass ok FAIL { is its own word, needs a space
detailsdetailsdetails

35 passed, 8 ok, 0 known unimplemented, 3 known bugs, 6 failed, 0 skipped

Details on runs that didn't PASS

bash0 Bad env name: hyphen

stdout:
stderr: 
/bin/bash: line 1: export: `FOO-BAR=foo': not a valid identifier
mksh0 Bad env name: hyphen

stdout:
stderr: 
/bin/mksh: <stdin>[1]: export: FOO-BAR=foo: is not an identifier
osh0 Bad env name: hyphen

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 900, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 757, in _Execute
    ok, val = self.ev.EvalCompoundWord(pair.rhs)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 492, in EvalCompoundWord
    v = self._EvalCompoundWord(word, ifs, do_glob, elide_empty)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 448, in _EvalCompoundWord
    assert isinstance(word, ast.CompoundWord), "Expected CompoundWord, got %s" % word
AssertionError: Expected CompoundWord, got None
bash1 Bad env name: period

stdout:
stderr: 
/bin/bash: line 1: export: `FOO.BAR=foo': not a valid identifier
mksh1 Bad env name: period

stdout:
stderr: 
/bin/mksh: <stdin>[1]: export: FOO.BAR=foo: is not an identifier
osh1 Bad env name: period

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 900, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 757, in _Execute
    ok, val = self.ev.EvalCompoundWord(pair.rhs)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 492, in EvalCompoundWord
    v = self._EvalCompoundWord(word, ifs, do_glob, elide_empty)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 448, in _EvalCompoundWord
    assert isinstance(word, ast.CompoundWord), "Expected CompoundWord, got %s" % word
AssertionError: Expected CompoundWord, got None
bash3 Bad braced var sub -- not allowed

stdout:
stderr: 
/bin/bash: line 1: ${%}: bad substitution
mksh3 Bad braced var sub -- not allowed

stdout:
stderr: 
/bin/mksh: <stdin>[1]: ${%}: bad substitution
osh3 Bad braced var sub -- not allowed

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 286, in OshMain
    node = c_parser.ParseWholeFile()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1530, in ParseWholeFile
    node = self.ParseCommandTerm()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1438, in ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1303, in ParseAndOr
    left = self.ParsePipeline()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1239, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1221, in ParseCommand
    return self.ParseSimpleCommand()  # echo foo
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 538, in ParseSimpleCommand
    result = self._ScanSimpleCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 350, in _ScanSimpleCommand
    if not self._Peek(): return None
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 147, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1098, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1059, in _ReadWord
    w = self._ReadCompoundWord(lex_mode=lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 905, in _ReadCompoundWord
    part = self._ReadLeftParts()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 532, in _ReadLeftParts
    return self._ReadBracedBracedVarSub(d_quoted=False)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 458, in _ReadBracedBracedVarSub
    raise AssertionError(self.cur_token)
AssertionError: (token id:Unknown_Tok val:"%" span_id:3)
dash4 Bad var sub caught at parse time

stdout:
ok
stderr:
bash4 Bad var sub caught at parse time

stdout:
ok
stderr:
mksh4 Bad var sub caught at parse time

stdout:
ok
stderr:
osh4 Bad var sub caught at parse time

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 286, in OshMain
    node = c_parser.ParseWholeFile()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1530, in ParseWholeFile
    node = self.ParseCommandTerm()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1438, in ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1303, in ParseAndOr
    left = self.ParsePipeline()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1239, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1202, in ParseCommand
    node = self.ParseCompoundCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1012, in ParseCompoundCommand
    return self.ParseIf()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 967, in ParseIf
    body = self.ParseCommandList()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1508, in ParseCommandList
    node = self.ParseCommandTerm()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1438, in ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1303, in ParseAndOr
    left = self.ParsePipeline()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1239, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1221, in ParseCommand
    return self.ParseSimpleCommand()  # echo foo
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 538, in ParseSimpleCommand
    result = self._ScanSimpleCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 350, in _ScanSimpleCommand
    if not self._Peek(): return None
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 147, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1098, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1059, in _ReadWord
    w = self._ReadCompoundWord(lex_mode=lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 905, in _ReadCompoundWord
    part = self._ReadLeftParts()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 532, in _ReadLeftParts
    return self._ReadBracedBracedVarSub(d_quoted=False)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 458, in _ReadBracedBracedVarSub
    raise AssertionError(self.cur_token)
AssertionError: (token id:Unknown_Tok val:"%" span_id:15)
osh8 $1 .. $9 are scoped, while $0 is not

[osh stdout] Expected b'sh a b\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 900, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 791, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 707, in _Execute
    status = thunk.RunInParent()
  File "/home/andy/git/oil/bin/../core/process.py", line 369, in RunInParent
    return self.ex.RunFunc(self.func_node, self.argv)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 494, in RunFunc
    status = self._Execute(func_body)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 791, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 721, in _Execute
    status = self._Execute(node.command)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 724, in _Execute
    status = self._RunPipeline(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 648, in _RunPipeline
    p = self._GetProcessForNode(child)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 544, in _GetProcessForNode
    argv = self.ev.EvalWords(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 769, in EvalWords
    return self._EvalWords(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 759, in _EvalWords
    val = self._EvalCompoundWord(w, ifs=ifs, do_glob=do_glob)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 455, in _EvalCompoundWord
    val = self._EvalWordPart(p, quoted=False)  # may raise
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 671, in _EvalWordPart
    defined, val = self._EvalVarNum(var_num)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 540, in _EvalVarNum
    raise NotImplementedError
NotImplementedError
dash12 { is its own word, needs a space

stdout:
stderr: 
/bin/dash: 1: {ls: not found
mksh12 { is its own word, needs a space

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '}' unexpected
osh12 { is its own word, needs a space

[osh status] Expected 2, got 127

stdout:
stderr: 
Unexpected error in execvpe('{ls', ['{ls'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/{ls'