[Nagiosplug-checkins] Nagios-Plugin/t Nagios-Plugin-Getopt-01.t, 1.1, 1.2
Ton Voon
tonvoon at users.sourceforge.net
Thu Aug 31 10:34:26 CEST 2006
Update of /cvsroot/nagiosplug/Nagios-Plugin/t
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25984/t
Modified Files:
Nagios-Plugin-Getopt-01.t
Log Message:
Support multiple -v options for verbosity level
Index: Nagios-Plugin-Getopt-01.t
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/t/Nagios-Plugin-Getopt-01.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Nagios-Plugin-Getopt-01.t 30 Aug 2006 01:20:41 -0000 1.1
+++ Nagios-Plugin-Getopt-01.t 31 Aug 2006 08:34:24 -0000 1.2
@@ -2,7 +2,7 @@
use strict;
-use Test::More tests => 72;
+use Test::More tests => 76;
BEGIN { use_ok('Nagios::Plugin::Getopt') };
my %PARAM = (
@@ -45,6 +45,17 @@
is($ng->critical, 10, 'critical set to 10');
is($ng->timeout, 12, 'timeout set to 12');
+# Check multiple verbose flags
+ at ARGV = qw(-w 3 --critical 10 -v -v -v);
+$ng = setup;
+$ng->getopts;
+is ($ng->verbose, 3, "Verbose set to level 3");
+
+ at ARGV = qw(-w 3 --critical 10 --verbose --verbose --verbose);
+$ng = setup;
+$ng->getopts;
+is ($ng->verbose, 3, "Verbose set to level 3 (longhand)");
+
# Missing args
@ARGV = qw();
$ng = setup;
More information about the Commits
mailing list