Results for ysh-builtin-eval.test.sh

statusyshysh-cpp
pass 3028
FAIL 13
total3131
caseyshysh-cppdescription
0pass pass eval builtin does not take a literal block - can restore this later
1pass pass Eval a block within a proc
2pass pass Eval block created by calling a proc
3pass pass io->eval with argv bindings
4pass pass eval lines with argv bindings
5pass pass eval lines with var bindings
6pass pass eval with custom dollar0
7pass pass eval with vars bindings
8pass pass dynamic binding names and mutation
9pass pass binding procs in the eval-ed namespace
10pass pass vars initializes the variable frame, but does not remember it
11pass pass eval pos_args must be strings
12pass pass eval with vars follows same scoping as without
13pass pass eval 'mystring' vs. call io->eval(myblock)
14pass pass io->eval(to_dict=true) - local and global
15pass FAIL io->eval(to_dict=true) with dollar0, pos_args, vars - dict ordering bug
details
16pass FAIL io->eval(to_dict=true) with in_captured_frame=true
details
17pass pass parseCommand then io->eval(to_dict=true) - in global scope
18pass pass parseCommand with syntax error
19pass pass Dict (&d) { ... } converts frame to dict
20pass pass block in Dict (&d) { ... } can read from outer scope
21pass pass block in yb-capture Dict (&d) can read from outer scope
22pass pass Dict (&d) and setvar
23pass pass Dict (&d) and setglobal
24pass pass bindings created shvar persist, which is different than eval(to_dict=true)
25pass pass io->eval with in_captured_frame=true can express cd builtin
26pass pass io->eval with in_captured_frame=true can express cd builtin in different module
27pass pass io->eval() has cleaner scoping than shell's eval builtin
28pass pass io->eval with in_captured_frame=true and setglobal
29FAIL FAIL eval should have a sandboxed mode
detailsdetails
30pass pass io->evalExpr() with vars, dollar0, pos_args
58 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

ysh-cpp15 io->eval(to_dict=true) with dollar0, pos_args, vars - dict ordering bug

[ysh-cpp stdout] Expected '{\n "foo": "global",\n "z": "zero",\n "one": "a",\n "two": "b",\n "three": "+c",\n "x": "X",\n "y": "_Y"\n}\n' Got '{\n "y": "_Y",\n "x": "X",\n "foo": "global",\n "z": "zero",\n "one": "a",\n "two": "b",\n "three": "+c"\n}\n'

stdout:
{
  "y": "_Y",
  "x": "X",
  "foo": "global",
  "z": "zero",
  "one": "a",
  "two": "b",
  "three": "+c"
}
stderr:
ysh-cpp16 io->eval(to_dict=true) with in_captured_frame=true

[ysh-cpp stdout] Expected '{\n "var_in_p_frame": "p",\n "foo": "global",\n "z": "zero",\n "one": "a",\n "two": "b",\n "three": "+c",\n "x": "X",\n "y": "_Y"\n}\n' Got '{\n "var_in_p_frame": "p",\n "y": "_Y",\n "x": "X",\n "foo": "global",\n "z": "zero",\n "one": "a",\n "two": "b",\n "three": "+c"\n}\n'

stdout:
{
  "var_in_p_frame": "p",
  "y": "_Y",
  "x": "X",
  "foo": "global",
  "z": "zero",
  "one": "a",
  "two": "b",
  "three": "+c"
}
stderr:
ysh29 eval should have a sandboxed mode

[ysh stdout] Expected 'TODO\n', got ''
[ysh status] Expected 1, got 2

stdout:
stderr: 
      var d = {}
          ^
[ stdin ]:12: 'd' was already declared
ysh-cpp29 eval should have a sandboxed mode

[ysh-cpp stdout] Expected 'TODO\n', got ''
[ysh-cpp status] Expected 1, got 2

stdout:
stderr: 
      var d = {}
          ^
[ stdin ]:12: 'd' was already declared