By default, if the test raises any signal or exits with anything other than 0, the test fails.
Otherwise, you can't (yet!) test if the code exits with a specific value nor simply redirect input/output, but I'll be sure to take these suggestions into account, thanks!
Both will be implemented quite soon.