Results for ysh-builtin-eval.test.sh

statusysh
pass 23
FAIL 3
total26
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
3FAIL io->eval(block) can read variables like eval ''
details
4FAIL eval should have a sandboxed mode
details
5pass io->eval with argv bindings
6pass eval lines with argv bindings
7pass eval lines with var bindings
8pass eval with custom dollar0
9pass eval with vars bindings
10pass dynamic binding names and mutation
11pass binding procs in the eval-ed namespace
12pass vars initializes the variable frame, but does not remember it
13pass eval pos_args must be strings
14pass eval with vars follows same scoping as without
15pass eval 'mystring' vs. call io->eval(myblock)
16pass io->evalToDict() - local and global
17pass parseCommand then io->evalToDict() - in global scope
18pass parseCommand with syntax error
19FAIL Dict (&d) { ... } converts frame to dict
details
20pass block in Dict (&d) { ... } can read from outer scope
21pass block in yb-capture Dict (&d) can read from outer scope
22pass Dict (&d) and setvar
23pass Dict (&d) and setglobal
24pass bindings created shvar persist, which is different than evalToDict()
25pass Block Closures in a Loop !
23 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

ysh3 io->eval(block) can read variables like eval ''

[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 ]:14: fatal: Undefined variable 'mylocal'
ysh4 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)
ysh19 Dict (&d) { ... } converts frame to dict

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

stdout:
(Dict)   {"bare":42,"k3":"k3"}
stderr: