Query: test::exit
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Test::Exit(3pm) User Contributed Perl Documentation Test::Exit(3pm)NAMETest::Exit - Test that some code calls exit() without terminating testingVERSIONversion 0.03SYNOPSISuse Test::More tests => 4; use Test::Exit; exits_ok { exit 1; } "exiting exits" never_exits_ok { print "Hi!"; } "not exiting doesn't exit" exits_zero { exit 0; } "exited with success" exits_nonzero { exit 42; } "exited with failure"DESCRIPTIONTest::Exit provides some simple tools for testing that code does or does not call "exit()", while stopping code that does exit at the point of the "exit()". Currently it does so by means of exceptions, so it will not function properly if the code under test calls "exit()" inside of an "eval" block or string. The only criterion tested is that the supplied code does or does not call "exit()". If the code throws an exception, the exception will be propagated and you will have to call it yourself. "die()"ing is not exiting for the purpose of these tests. exits_ok Tests that the supplied code calls "exit()" at some point. exits_nonzero Tests that the supplied code calls "exit()" with a nonzero value. exits_zero Tests that the supplied code calls "exit()" with a zero (successful) value. never_exits_ok Tests that the supplied code completes without calling "exit()".AUTHORAndrew Rodland <andrew@hbslabs.com>COPYRIGHT AND LICENSEThis software is copyright (c) 2009 by HBS Labs, LLC.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2009-12-04 Test::Exit(3pm)
Related Man Pages |
---|
pod2test(1p) - debian |
test::requires5.18(3) - mojave |
test::fatal(3) - centos |
pod::tests(3pm) - debian |
test::exit(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
exiting in c |
Where can I find a list of exit codes? (Exit code 64) |
Returning an exit code from a bash function |
Check ID in a file matches to the name of the file |
C Exit Not Executing |