Add exit status and optional return values to `test` commands