summaryrefslogtreecommitdiffstats
path: root/t/Monitoring-Plugin-Functions-01.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Monitoring-Plugin-Functions-01.t')
-rw-r--r--t/Monitoring-Plugin-Functions-01.t13
1 files changed, 6 insertions, 7 deletions
diff --git a/t/Monitoring-Plugin-Functions-01.t b/t/Monitoring-Plugin-Functions-01.t
index 3f1ab75..acce176 100644
--- a/t/Monitoring-Plugin-Functions-01.t
+++ b/t/Monitoring-Plugin-Functions-01.t
@@ -1,6 +1,6 @@
1 1
2use strict; 2use strict;
3use Test::More tests => 116; 3use Test::More tests => 117;
4 4
5BEGIN { use_ok("Monitoring::Plugin::Functions", ":all"); } 5BEGIN { use_ok("Monitoring::Plugin::Functions", ":all"); }
6Monitoring::Plugin::Functions::_fake_exit(1); 6Monitoring::Plugin::Functions::_fake_exit(1);
@@ -90,15 +90,14 @@ for (@ugly2) {
90 90
91# plugin_exit message with longoutput 91# plugin_exit message with longoutput
92my @ugly3 = ( 92my @ugly3 = (
93 [ "MSG\nLONGOUTPUT", " - MSG\nLONGOUTPUT" ], 93 [ "MSG\nLONGOUTPUT", "MONITORING-PLUGIN-FUNCTIONS-01 CRITICAL - MSG\nLONGOUTPUT\n" ],
94 [ "\nLONGOUTPUT", "\nLONGOUTPUT" ], 94 [ "\nLONGOUTPUT", "MONITORING-PLUGIN-FUNCTIONS-01 CRITICAL\nLONGOUTPUT\n" ],
95 [ " \nLONGOUTPUT", " \nLONGOUTPUT" ], 95 [ " \nLONGOUTPUT", "MONITORING-PLUGIN-FUNCTIONS-01 CRITICAL \nLONGOUTPUT\n" ],
96 [ "LONGOUTPUT\n\n blah.", "MONITORING-PLUGIN-FUNCTIONS-01 CRITICAL - LONGOUTPUT\n\n blah.\n" ],
96); 97);
97for (@ugly3) { 98for (@ugly3) {
98 $r = plugin_exit(CRITICAL, $_->[0]); 99 $r = plugin_exit(CRITICAL, $_->[0]);
99 like($r->message, qr/CRITICAL$_->[1]$/, 100 is($r->message, $_->[1], "plugin_exit() output as expected");
100 sprintf('plugin_exit(CRITICAL, $msg) output matched "%s"',
101 "CRITICAL$_->[1]"));
102} 101}
103 102
104# Test plugin_die( $msg ) 103# Test plugin_die( $msg )