Results for ysh-builtin-eval.test.sh

statusyshysh_ALT
pass 44
FAIL 66
total1010
caseyshysh_ALTdescription
0pass pass Eval 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 eval (block) can read variables like eval ''
4FAIL FAIL eval should have a sandboxed mode
detailsdetails
5FAIL FAIL eval with argv bindings
detailsdetails
6FAIL FAIL eval with vars bindings
detailsdetails
7FAIL FAIL dynamic binding names and mutation
detailsdetails
8FAIL FAIL binding procs in the eval-ed namespace
detailsdetails
9FAIL FAIL vars initializes the variable frame, but does not remember it
detailsdetails
8 passed, 0 OK, 0 not implemented, 0 BUG, 12 failed, 0 timeouts, 0 cases skipped
6 failed under osh

Details on runs that didn't PASS

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)
ysh_ALT4 eval should have a sandboxed mode

[ysh_ALT 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)
ysh5 eval with argv bindings

[ysh stdout] Expected 'foo bar baz\n(List) ["foo","bar","baz"]\n' Got ''
[ysh status] Expected 0, got 3

stdout:
stderr: 
  eval ^[echo "$@"] (argv=:| foo bar baz |)
                    ^
[ stdin ]:1: fatal: Expected at least 1 typed args, but only got 0
ysh_ALT5 eval with argv bindings

[ysh_ALT stdout] Expected 'foo bar baz\n(List) ["foo","bar","baz"]\n' Got ''
[ysh_ALT status] Expected 0, got 3

stdout:
stderr: 
  eval ^[echo "$@"] (argv=:| foo bar baz |)
                    ^
[ stdin ]:1: fatal: Expected at least 1 typed args, but only got 0
ysh6 eval with vars bindings

[ysh stdout] Expected 'abc\n123\n', got '(Str) "abc"\n'
[ysh status] Expected 0, got 3

stdout:
(Str)   "abc"
stderr:
  eval (^(pp line (myVar)), vars={ 'myVar': '123' })
       ^
[ stdin ]:3: fatal: Got unexpected named args: vars
ysh_ALT6 eval with vars bindings

[ysh_ALT stdout] Expected 'abc\n123\n', got '(Str) "abc"\n'
[ysh_ALT status] Expected 0, got 3

stdout:
(Str)   "abc"
stderr:
  eval (^(pp line (myVar)), vars={ 'myVar': '123' })
       ^
[ stdin ]:3: fatal: Got unexpected named args: vars
ysh7 dynamic binding names and mutation

[ysh stdout] Expected '(Dict) {"a":1}\n(Dict) {"b":2}\n(Dict) {"c":3}\n(List) [{"a":1,"d":0},{"b":2,"d":0},{"c":3,"d":0}]\n' Got ''
[ysh status] Expected 0, got 3

stdout:
stderr: 
      eval (block, vars={ binding: _ })
           ^
[ stdin ]:7: fatal: Got unexpected named args: vars
ysh_ALT7 dynamic binding names and mutation

[ysh_ALT stdout] Expected '(Dict) {"a":1}\n(Dict) {"b":2}\n(Dict) {"c":3}\n(List) [{"a":1,"d":0},{"b":2,"d":0},{"c":3,"d":0}]\n' Got ''
[ysh_ALT status] Expected 0, got 3

stdout:
stderr: 
      eval (block, vars={ binding: _ })
           ^
[ stdin ]:7: fatal: Got unexpected named args: vars
ysh8 binding procs in the eval-ed namespace

[ysh stdout] Expected 'flag -h --help\narg file\n', got ''
[ysh status] Expected 0, got 1

stdout:
stderr: 
    eval (block, vars={ 'flag': __flag, 'arg': __arg })
                                ^~~~~~
[ stdin ]:10: fatal: Undefined variable '__flag'
ysh_ALT8 binding procs in the eval-ed namespace

[ysh_ALT stdout] Expected 'flag -h --help\narg file\n', got ''
[ysh_ALT status] Expected 0, got 1

stdout:
stderr: 
    eval (block, vars={ 'flag': __flag, 'arg': __arg })
                                ^~~~~~
[ stdin ]:10: fatal: Undefined variable '__flag'
ysh9 vars initializes the variable frame, but does not remember it

[ysh stdout] Expected '(Dict) {"foo":123}\n', got ''
[ysh status] Expected 0, got 2

stdout:
stderr: 
  eval (^(var bar = 321), vars=vars)
                       ^
[ stdin ]:2: Syntax error in expression (near Id.Eof_RParen)
ysh_ALT9 vars initializes the variable frame, but does not remember it

[ysh_ALT stdout] Expected '(Dict) {"foo":123}\n', got ''
[ysh_ALT status] Expected 0, got 2

stdout:
stderr: 
  eval (^(var bar = 321), vars=vars)
                       ^
[ stdin ]:2: Syntax error in expression (near Id.Eof_RParen)