| status | ysh | |
| pass | 17 | |
| FAIL | 3 | |
| total | 20 | |
| case | ysh | description |
| 0 | FAIL | User errors behave like builtin errors |
| details | ||
| 1 | pass | _error register is initially empty dict |
| 2 | FAIL | error builtin sets _error.message, which can be used by programs |
| details | ||
| 3 | pass | error builtin adds named args as properties on _error Dict |
| 4 | pass | Errors within multiple functions |
| 5 | pass | Impact of errors on var declaration |
| 6 | pass | default error code is 10 |
| 7 | pass | error code should be an integer |
| 8 | pass | Error code should be named arg, not positional |
| 9 | pass | error cannot take word args |
| 10 | pass | error requires arguments |
| 11 | pass | error cannot have a code of 0 |
| 12 | FAIL | try { error oops } |
| details | ||
| 13 | pass | Handle _error.code |
| 14 | pass | failed builtin usage |
| 15 | pass | failed builtin |
| 16 | pass | assert on values |
| 17 | pass | assert on expressions |
| 18 | pass | assert on expression that fails |
| 19 | pass | assert on chained comparison expression is not special |
17 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped 3 failed under osh
| ysh | 0 User errors behave like builtin errors [ysh stdout] Expected 'status=3\n' Got '' [ysh status] Expected 3 Got 1 stdout: stderr: echo status=$_status
^~~~~~~~
[ stdin ]:10: fatal: Undefined variable '_status'
|
| ysh | 2 error builtin sets _error.message, which can be used by programs [ysh stdout] Expected 'status=3\nmessage=divide by zero: 42 / 0\nstatus=3\nmessage=divide by zero: 5 / 0\n' Got '' [ysh status] Expected 0 Got 1 stdout: stderr: echo status=$_status
^~~~~~~~
[ stdin ]:9: fatal: Undefined variable '_status'
|
| ysh | 12 try { error oops } [ysh stdout] Expected 'status=10\n' Got '' [ysh status] Expected 0 Got 1 stdout: stderr: echo status=$_status
^~~~~~~~
[ stdin ]:2: fatal: Undefined variable '_status'
|