diff options
| author | tonvoon@users.sourceforge.net <tonvoon@users.sourceforge.net> | 2009-06-05 17:01:22 +0000 |
|---|---|---|
| committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-06-06 02:16:11 -0400 |
| commit | 673108c6cd8c84f72db0ddb2997b96cbe28ba5ea (patch) | |
| tree | c981e66bd9ab75637a916f60ca955d42bb38f1eb /t | |
| parent | b0ff1e4262fa7f09c9cdb91206b6d2a2a1aa06a7 (diff) | |
| download | monitoring-plugin-perl-673108c6cd8c84f72db0ddb2997b96cbe28ba5ea.tar.gz | |
Fixed parsing when two = signs within the performance data portion
Diffstat (limited to 't')
| -rw-r--r-- | t/Nagios-Plugin-Performance.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/Nagios-Plugin-Performance.t b/t/Nagios-Plugin-Performance.t index bbf0b20..6904f4c 100644 --- a/t/Nagios-Plugin-Performance.t +++ b/t/Nagios-Plugin-Performance.t | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | 1 | ||
| 2 | use warnings; | ||
| 2 | use strict; | 3 | use strict; |
| 3 | use Test::More; | 4 | use Test::More; |
| 4 | use Nagios::Plugin::Functions; | 5 | use Nagios::Plugin::Functions; |
| @@ -40,7 +41,7 @@ my @test = ( | |||
| 40 | }, | 41 | }, |
| 41 | ); | 42 | ); |
| 42 | 43 | ||
| 43 | plan tests => (11 * scalar @test) + 175; | 44 | plan tests => (11 * scalar @test) + 176; |
| 44 | 45 | ||
| 45 | use_ok('Nagios::Plugin::Performance'); | 46 | use_ok('Nagios::Plugin::Performance'); |
| 46 | diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE}; | 47 | diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE}; |
| @@ -349,4 +350,7 @@ is( $p[2]->min, undef, "min ok"); | |||
| 349 | is( $p[2]->max, undef, "max ok"); | 350 | is( $p[2]->max, undef, "max ok"); |
| 350 | 351 | ||
| 351 | 352 | ||
| 353 | @p = Nagios::Plugin::Performance->parse_perfstring("processes=9;WKFLSV32.exe;9="); | ||
| 354 | is_deeply( \@p, [], "Fails parsing correctly"); | ||
| 355 | |||
| 352 | # add_perfdata tests in t/Nagios-Plugin-01.t | 356 | # add_perfdata tests in t/Nagios-Plugin-01.t |
