Results for ysh-builtin-eval.test.sh

statusysh
pass 23
FAIL 4
total27
caseyshdescription
0pass eval builtin does not take a literal block - can restore this later
1pass Eval a block within a proc
2pass Eval block created by calling a proc
3pass io->eval with argv bindings
4pass eval lines with argv bindings
5pass eval lines with var bindings
6pass eval with custom dollar0
7pass eval with vars bindings
8pass dynamic binding names and mutation
9pass binding procs in the eval-ed namespace
10pass vars initializes the variable frame, but does not remember it
11pass eval pos_args must be strings
12pass eval with vars follows same scoping as without
13pass eval 'mystring' vs. call io->eval(myblock)
14pass io->evalToDict() - local and global
15pass parseCommand then io->evalToDict() - in global scope
16pass parseCommand with syntax error
17FAIL Dict (&d) { ... } converts frame to dict
details
18pass block in Dict (&d) { ... } can read from outer scope
19pass block in yb-capture Dict (&d) can read from outer scope
20pass Dict (&d) and setvar
21pass Dict (&d) and setglobal
22pass bindings created shvar persist, which is different than evalToDict()
23FAIL io->evalInFrame() can express try, cd builtins
details
24FAIL parseCommand(), io->evalInFrame(frag, frame) can behave like eval $mystr
details
25FAIL eval should have a sandboxed mode
details
26pass io->evalExpr() with vars, dollar0, pos_args
23 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

ysh17 Dict (&d) { ... } converts frame to dict

[ysh stdout] Expected '', got '(Dict) {"bare":42,"k3":"k3"}\n'

stdout:
(Dict)   {"bare":42,"k3":"k3"}
stderr:
ysh23 io->evalInFrame() can express try, cd builtins

[ysh stdout] Expected 'x: i = 0, j = 2\nx: i = 1, j = 3\nx: i = 2, j = 4\n' Got '/tmp /home/uke/oil/_tmp/spec-tmp/ysh-builtin-eval.test.sh.37220/23-ysh\n'
[ysh status] Expected 0, got 1

stdout:
/tmp /home/uke/oil/_tmp/spec-tmp/ysh-builtin-eval.test.sh.37220/23-ysh
stderr:
    var frag = getCommandFrag(block)
               ^~~~~~~~~~~~~~
[ stdin ]:8: fatal: Undefined variable 'getCommandFrag'
ysh24 parseCommand(), io->evalInFrame(frag, frame) can behave like eval $mystr

[ysh stdout] Expected 'mylocal=42\nmylocal=99\n', got 'mylocal=42\n'
[ysh status] Expected 0, got 1

stdout:
mylocal=42
stderr:
    echo mylocal=$mylocal
                 ^~~~~~~~
[ stdin ]:15: fatal: Undefined variable 'mylocal'
ysh25 eval should have a sandboxed mode

[ysh stdout] Expected 'TODO\n', got ''

stdout:
stderr: 
    push-frame {
               ^
[ stdin ]:4: fatal: 'push-frame' appears to be external. External commands don't accept typed args (OILS-ERR-200)