cgreen icon indicating copy to clipboard operation
cgreen copied to clipboard

Test signal

Open hartbit opened this issue 1 year ago • 1 comments

Is there a way to test that a test terminates with a particular signal ? I want to test my functions abort when expected.

hartbit avatar May 03 '23 20:05 hartbit

If you mean signals like SIGHUP, SIGINT etc. no there isn't. The only thing that happens after a test has exited is to check for expected calls to match. If a test aborts using a signal you will get a test exception and a reporter call indicating this.

I think it would be possible to add a new type of assertions that would make that possible, but currently no.

thoni56 avatar May 10 '23 11:05 thoni56