summaryrefslogtreecommitdiffstats
path: root/t/Nagios-Plugin-Performance.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Nagios-Plugin-Performance.t')
-rw-r--r--t/Nagios-Plugin-Performance.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/Nagios-Plugin-Performance.t b/t/Nagios-Plugin-Performance.t
index e3fac07..8426828 100644
--- a/t/Nagios-Plugin-Performance.t
+++ b/t/Nagios-Plugin-Performance.t
@@ -16,7 +16,7 @@ my @test = (
16 }, 16 },
17); 17);
18 18
19plan tests => (8 * scalar @test) + 132; 19plan tests => (8 * scalar @test) + 135;
20 20
21use_ok('Nagios::Plugin::Performance'); 21use_ok('Nagios::Plugin::Performance');
22diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE}; 22diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE};
@@ -250,4 +250,10 @@ is( $p[0]->threshold->warning, 60, "warn okay");
250is( $p[0]->threshold->critical->is_set, 1, "Critical range has been set"); 250is( $p[0]->threshold->critical->is_set, 1, "Critical range has been set");
251is( $p[0]->threshold->critical, 120, "warn okay"); 251is( $p[0]->threshold->critical, 120, "warn okay");
252 252
253# Some values with funny commas
254@p = Nagios::Plugin::Performance->parse_perfstring("time=1800,600,300,0,3600 other=45.6");
255is( $p[0]->label, "other", "Ignored time=1800,600,300,0,3600, but allowed other=45.6");
256is( $p[0]->value, 45.6, "value okay");
257is( $p[0]->uom, "", "uom okay");
258
253# add_perfdata tests in t/Nagios-Plugin-01.t 259# add_perfdata tests in t/Nagios-Plugin-01.t