Suppose that in one of the PERL modules there is one subroutine module -
sub exam { .... .... exit 0; }
and I want to write a test case for this API as
is('exam',0,"exam subroutine works properly");
but it does not work, because after exit 0 the PERL script exits.
so my question is: how can we mock exit behavior?
source share