Results for ysh-method-io.test.sh

statusyshysh_ALT
pass 66
FAIL 22
total88
caseyshysh_ALTdescription
0pass pass captureStdout() is like $()
1pass pass captureStdout() failure
2pass pass io->eval() is like eval builtin
3pass pass captureOutputs() is like $() but captures stderr as well
4FAIL FAIL captureOutputs() failure
detailsdetails
5FAIL FAIL captureOutputs() with fail=false
detailsdetails
6pass pass io->eval() with failing command - caller must handle
7pass pass io->eval() with exit
12 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

ysh4 captureOutputs() failure

[ysh stdout] Expected '(Dict) {"status":1,"code":4,"message":"captureOutput(): command failed with status 1"}\n' Got '(Dict) {"status":1,"code":4,"message":"captureOutputs(): command failed with status 1"}\n'

stdout:
(Dict)   {"status":1,"code":4,"message":"captureOutputs(): command failed with status 1"}
stderr:
  var x = io.captureOutputs(c)
                           ^
[ stdin ]:9: fatal: captureOutputs(): command failed with status 1
ysh_ALT4 captureOutputs() failure

[ysh_ALT stdout] Expected '(Dict) {"status":1,"code":4,"message":"captureOutput(): command failed with status 1"}\n' Got '(Dict) {"status":1,"code":4,"message":"captureOutputs(): command failed with status 1"}\n'

stdout:
(Dict)   {"status":1,"code":4,"message":"captureOutputs(): command failed with status 1"}
stderr:
  var x = io.captureOutputs(c)
                           ^
[ stdin ]:9: fatal: captureOutputs(): command failed with status 1
ysh5 captureOutputs() with fail=false

[ysh stdout] Expected '(Dict) {"code":0}\n(Dict) {"stdout":"one","stderr":"","status":1}\n' Got '(Dict) {"code":0}\n(Dict) {"stdout":"one","stderr":" var c = ^(echo one; false; echo two)\\n ^~~~~\\n[ stdin ]:1: errexit PID 6637: command.Simple failed with status 1","status":1}\n'

stdout:
(Dict)   {"code":0}
(Dict)   {"stdout":"one","stderr":"  var c = ^(echo one; false; echo two)\n                      ^~~~~\n[ stdin ]:1: errexit PID 6637: command.Simple failed with status 1","status":1}
stderr:
ysh_ALT5 captureOutputs() with fail=false

[ysh_ALT stdout] Expected '(Dict) {"code":0}\n(Dict) {"stdout":"one","stderr":"","status":1}\n' Got '(Dict) {"code":0}\n(Dict) {"stdout":"one","stderr":" var c = ^(echo one; false; echo two)\\n ^~~~~\\n[ stdin ]:1: errexit PID 6639: command.Simple failed with status 1","status":1}\n'

stdout:
(Dict)   {"code":0}
(Dict)   {"stdout":"one","stderr":"  var c = ^(echo one; false; echo two)\n                      ^~~~~\n[ stdin ]:1: errexit PID 6639: command.Simple failed with status 1","status":1}
stderr: