Unix and Linux Discussions Tagged with exit code |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
3,837 |
Shell Programming and Scripting |
|
|
|
3 |
1,887 |
Shell Programming and Scripting |
|
|
|
7 |
21,120 |
Shell Programming and Scripting |
|
|
|
3 |
7,188 |
Shell Programming and Scripting |
|
|
|
8 |
6,721 |
Shell Programming and Scripting |
|
|
|
3 |
19,314 |
Shell Programming and Scripting |
|
|
|
5 |
9,405 |
Shell Programming and Scripting |
|
|
|
8 |
8,031 |
Shell Programming and Scripting |
|
|
|
0 |
10,542 |
Shell Programming and Scripting |
|
|
|
16 |
18,343 |
UNIX and Linux Applications |
|
|
|
1 |
3,570 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,718 |
Shell Programming and Scripting |
|
|
|
4 |
3,544 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,921 |
Shell Programming and Scripting |
|
|
|
1 |
14,099 |
Shell Programming and Scripting |
|
|
|
3 |
21,273 |
Shell Programming and Scripting |
|
|
|
4 |
15,705 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,278 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
28,052 |
Programming |
|
|
|
1 |
2,863 |
UNIX for Dummies Questions & Answers |
Test::Exit(3pm) User Contributed Perl Documentation Test::Exit(3pm)
NAME
Test::Exit - Test that some code calls exit() without terminating testing
VERSION
version 0.03
SYNOPSIS
use 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"
DESCRIPTION
Test::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()".
AUTHOR
Andrew Rodland <andrew@hbslabs.com>
COPYRIGHT AND LICENSE
This 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)