diff options
Diffstat (limited to 't/Nagios-Plugin-Performance.t')
-rw-r--r-- | t/Nagios-Plugin-Performance.t | 8 |
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 | ||
19 | plan tests => (8 * scalar @test) + 132; | 19 | plan tests => (8 * scalar @test) + 135; |
20 | 20 | ||
21 | use_ok('Nagios::Plugin::Performance'); | 21 | use_ok('Nagios::Plugin::Performance'); |
22 | diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE}; | 22 | diag "\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"); | |||
250 | is( $p[0]->threshold->critical->is_set, 1, "Critical range has been set"); | 250 | is( $p[0]->threshold->critical->is_set, 1, "Critical range has been set"); |
251 | is( $p[0]->threshold->critical, 120, "warn okay"); | 251 | is( $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"); | ||
255 | is( $p[0]->label, "other", "Ignored time=1800,600,300,0,3600, but allowed other=45.6"); | ||
256 | is( $p[0]->value, 45.6, "value okay"); | ||
257 | is( $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 |