summaryrefslogtreecommitdiffstats
path: root/t/Nagios-Plugin-01.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Nagios-Plugin-01.t')
-rw-r--r--t/Nagios-Plugin-01.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/Nagios-Plugin-01.t b/t/Nagios-Plugin-01.t
index db12c35..3ada472 100644
--- a/t/Nagios-Plugin-01.t
+++ b/t/Nagios-Plugin-01.t
@@ -1,7 +1,7 @@
1# Nagios::Plugin original test cases 1# Nagios::Plugin original test cases
2 2
3use strict; 3use strict;
4use Test::More tests => 12; 4use Test::More tests => 13;
5 5
6BEGIN { use_ok('Nagios::Plugin') }; 6BEGIN { use_ok('Nagios::Plugin') };
7 7
@@ -41,6 +41,14 @@ $p->add_perfdata(
41cmp_ok( $p->all_perfoutput, 'eq', "size=1kB;10:25;~:25", "Perfdata correct"); 41cmp_ok( $p->all_perfoutput, 'eq', "size=1kB;10:25;~:25", "Perfdata correct");
42#diag "dumping perfdata: ". Dumper ($p->perfdata); 42#diag "dumping perfdata: ". Dumper ($p->perfdata);
43 43
44$p->add_perfdata(
45 label => "time",
46 value => "3.52",
47 threshold => $t,
48 );
49
50is( $p->all_perfoutput, "size=1kB;10:25;~:25 time=3.52;10:25;~:25", "Perfdata correct when no uom specified");
51
44my $expected = {qw( 52my $expected = {qw(
45 -1 WARNING 53 -1 WARNING
46 1 WARNING 54 1 WARNING