<< Catching Warnings
|
Acceptance, Regression, Unit, Functional... >>
<< Catching Warnings
|
Acceptance, Regression, Unit, Functional... >>
Dealing With Death
Dealing With Death
●
Use eval BLOCK.
local $@;
eval {
croak "Wibble";
};
like( $@, qr/^Wibble/ );
●
Use the same technique to check that things didn't die.
▶
Useful for past bugs where certain inputs would cause a fatal error.