summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2007-08-31 14:34:18 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2007-08-31 14:34:18 +0000
commitc6ee438b0525b73d36bbcf5e5a9e0d445f69129b (patch)
treeefc1ed1556e6a4be7f6f3cd83f0ce24217dcfbbe /t
parent95dba9c4213c2e7e8f4b572efd873c1979406221 (diff)
downloadmonitoring-plugin-perl-c6ee438b0525b73d36bbcf5e5a9e0d445f69129b.tar.gz
Convenience function to set use_die on use of N::P::Performance
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1773 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 't')
-rw-r--r--t/Nagios-Plugin-Performance-02.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/Nagios-Plugin-Performance-02.t b/t/Nagios-Plugin-Performance-02.t
new file mode 100644
index 0000000..c0c5a71
--- /dev/null
+++ b/t/Nagios-Plugin-Performance-02.t
@@ -0,0 +1,13 @@
1
2use strict;
3use Test::More tests => 3;
4use_ok("Nagios::Plugin::Performance", use_die => 1);
5
6eval { Nagios::Plugin::Functions::nagios_die("Testing") };
7is( $@, "NAGIOS-PLUGIN-PERFORMANCE-02 UNKNOWN - Testing\n", "use_die correctly set on import");
8
9
10use_ok("Nagios::Plugin::Performance");
11eval { Nagios::Plugin::Functions::nagios_die("Test OK exit", 0) };
12
13fail("Should not get here if code works correctly because prior nagios_die should have exited");