status | ysh | ysh_ALT | |
pass | 6 | 6 | |
FAIL | 2 | 2 | |
total | 8 | 8 | |
case | ysh | ysh_ALT | description |
0 | pass | pass | captureStdout() is like $() |
1 | pass | pass | captureStdout() failure |
2 | pass | pass | io->eval() is like eval builtin |
3 | pass | pass | captureOutputs() is like $() but captures stderr as well |
4 | FAIL | FAIL | captureOutputs() failure |
details | details | ||
5 | FAIL | FAIL | captureOutputs() with fail=false |
details | details | ||
6 | pass | pass | io->eval() with failing command - caller must handle |
7 | pass | 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
ysh | 4 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_ALT | 4 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 |
ysh | 5 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_ALT | 5 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: |