summaryrefslogtreecommitdiffstats
path: root/t/Nagios-Plugin-02.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Nagios-Plugin-02.t')
-rw-r--r--t/Nagios-Plugin-02.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/Nagios-Plugin-02.t b/t/Nagios-Plugin-02.t
index 360e180..15ae3d6 100644
--- a/t/Nagios-Plugin-02.t
+++ b/t/Nagios-Plugin-02.t
@@ -16,7 +16,7 @@ is(UNKNOWN, $ERRORS{UNKNOWN}, "UNKNOWN => $ERRORS{UNKNOWN}");
16is(DEPENDENT, $ERRORS{DEPENDENT}, "DEPENDENT => $ERRORS{DEPENDENT}"); 16is(DEPENDENT, $ERRORS{DEPENDENT}, "DEPENDENT => $ERRORS{DEPENDENT}");
17 17
18my $plugin = 'TEST_PLUGIN'; 18my $plugin = 'TEST_PLUGIN';
19my $np = Nagios::Plugin->new( shortname => $plugin ); 19my $np = Nagios::Plugin->new( shortname => $plugin, usage => "dummy usage" );
20is($np->shortname, $plugin, "shortname() is $plugin"); 20is($np->shortname, $plugin, "shortname() is $plugin");
21 21
22# Test nagios_exit( CONSTANT, $msg ), nagios_exit( $string, $msg ) 22# Test nagios_exit( CONSTANT, $msg ), nagios_exit( $string, $msg )
@@ -151,7 +151,7 @@ for (@ok) {
151# shortname testing 151# shortname testing
152SKIP: { 152SKIP: {
153 skip "requires File::Basename", 2 unless eval { require File::Basename }; 153 skip "requires File::Basename", 2 unless eval { require File::Basename };
154 $np = Nagios::Plugin->new; 154 $np = Nagios::Plugin->new (usage => "dummy usage", version => "1");
155 $plugin = uc File::Basename::basename($0); 155 $plugin = uc File::Basename::basename($0);
156 $plugin =~ s/\..*$//; 156 $plugin =~ s/\..*$//;
157 is($np->shortname, $plugin, "shortname() is '$plugin'"); 157 is($np->shortname, $plugin, "shortname() is '$plugin'");