Err.For_test
val protect : ?exn_handler:(exn -> t option) -> (unit -> unit) -> unit
Same as protect
, but won't return the exit code, rather print the code at the end in case of a non zero code, like in cram tests.
Wrap the execution of a function under an environment proper for test execution. For example, it will turn down the colors in user messages. For_test.protect
already does a wrap
- this is exposed if you'd like to run some test outside of a protect
handler.