| status | osh | |
| pass | 8 | |
| FAIL | 10 | |
| total | 18 | |
| case | osh | description |
| 0 | pass | eval() is a pure function |
| 1 | pass | evalExpr() is a pure function |
| 2 | FAIL | Idiom to handle purity errors from untrusted config files |
| details | ||
| 3 | pass | Executor: can run user-defined Procs |
| 4 | pass | Executor: can run Hay (while Hay is hard-coded) |
| 5 | pass | Executor: External Commands not allowed |
| 6 | pass | Command subs, pipelines not allowed with --eval-pure |
| 7 | pass | Process subs, subshells not allowed with eval() |
| 8 | pass | Background job & |
| 9 | FAIL | Redirects |
| details | ||
| 10 | FAIL | Are any builtins allowed? true, false |
| details | ||
| 11 | FAIL | Are source or use builtins allowed? |
| details | ||
| 12 | FAIL | Can log to stderr in pure mode |
| details | ||
| 13 | FAIL | io and vm are not allowed |
| details | ||
| 14 | FAIL | Can't make an alias of io->eval and call it, etc. |
| details | ||
| 15 | FAIL | Globbing not allowed |
| details | ||
| 16 | FAIL | $RANDOM $SECONDS |
| details | ||
| 17 | FAIL | Purely-evaluated code can't set traps for later |
| details |
8 passed, 0 OK, 0 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped 10 failed under osh
| osh | 2 Idiom to handle purity errors from untrusted config files [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 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 2327, in ReadWord
w = self._ReadWord(word_mode)
File "/home/uke/oil/osh/word_parse.py", line 2244, in _ReadWord
return self._ReadCompoundOrRedir(lex_mode)
File "/home/uke/oil/osh/word_parse.py", line 1892, in _ReadCompoundOrRedir
return self._ReadCompoundOrRedir3(lex_mode, Id.Undefined_Tok, True)
File "/home/uke/oil/osh/word_parse.py", line 1997, 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 1189, in _ReadDoubleQuoted
self._ReadLikeDQ(left_token, False, parts)
File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
|
| osh | 9 Redirects [osh stdout] Expected 'TODO\n' Got "removed 'out.txt'\n" stdout: removed 'out.txt'stderr: |
| osh | 10 Are any builtins allowed? true, false [osh status] Expected 0 Got 1 stdout: true builtin true command truestderr: builtin false
^~~~~~~
[ stdin ]:13: errexit PID 5937: Command failed with status 1
|
| osh | 11 Are source or use builtins allowed? [osh status] Expected 0 Got 127 stdout: stderr: source foo.ysh
^~~~~~
[ stdin ]:5: Command 'source' not found in pure mode (OILS-ERR-102)
[ stdin ]:5: errexit PID 5940: Command failed with status 127
|
| osh | 12 Can log to stderr in pure mode [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 2469, in ParseCommand
n8 = self.w_parser.ParseVarDecl(kw_token)
File "/home/uke/oil/osh/word_parse.py", line 1334, in ParseVarDecl
enode, last_token = self.parse_ctx.ParseVarDecl(kw_token, self.lexer)
File "/home/uke/oil/frontend/parse_lib.py", line 309, in ParseVarDecl
pnode, last_token = e_parser.Parse(lexer, grammar_nt.ysh_var_decl)
File "/home/uke/oil/ysh/expr_parse.py", line 357, in Parse
self.push_parser, lexer)
File "/home/uke/oil/ysh/expr_parse.py", line 245, in _PushYshTokens
node = c_parser.ParseCommandSub()
File "/home/uke/oil/osh/cmd_parse.py", line 2873, in ParseCommandSub
c_list = 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 2327, in ReadWord
w = self._ReadWord(word_mode)
File "/home/uke/oil/osh/word_parse.py", line 2244, in _ReadWord
return self._ReadCompoundOrRedir(lex_mode)
File "/home/uke/oil/osh/word_parse.py", line 1892, in _ReadCompoundOrRedir
return self._ReadCompoundOrRedir3(lex_mode, Id.Undefined_Tok, True)
File "/home/uke/oil/osh/word_parse.py", line 1997, 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 1189, in _ReadDoubleQuoted
self._ReadLikeDQ(left_token, False, parts)
File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
|
| osh | 13 io and vm are not allowed [osh stdout] Expected '' Got '<Frame 0x7fa31281baa0>\n(Int) 140338366888608\n<Stdin>\n<Frame 0x7fa312817d20>\n(Int) 140338366870464\n<Stdin>\n' stdout: <Frame 0x7fa31281baa0> (Int) 140338366888608 <Stdin> <Frame 0x7fa312817d20> (Int) 140338366870464 <Stdin>stderr: |
| osh | 14 Can't make an alias of io->eval and call it, etc. [osh stdout] Expected '' Got 'hi\n' stdout: histderr: |
| osh | 15 Globbing not allowed [osh stdout] Expected '' Got '*.txt\n' [osh status] Expected 0 Got 127 stdout: *.txtstderr: echo *.txt
^~~~
[ stdin ]:2: Command 'echo' not found in pure mode (OILS-ERR-102)
|
| osh | 16 $RANDOM $SECONDS [osh status] Expected 0 Got 1 stdout: stderr: echo not-implemented=$RANDOM
^~~~~~~
[ stdin ]:4: fatal: Undefined variable 'RANDOM'
|
| osh | 17 Purely-evaluated code can't set traps for later [osh status] Expected 0 Got 127 stdout: stderr: trap 'echo INT' INT
^~~~
[ stdin ]:2: Command 'trap' not found in pure mode (OILS-ERR-102)
|