diff options
Diffstat (limited to 't/Nagios-Plugin-Base.t')
-rw-r--r-- | t/Nagios-Plugin-Base.t | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/Nagios-Plugin-Base.t b/t/Nagios-Plugin-Base.t new file mode 100644 index 0000000..589f331 --- /dev/null +++ b/t/Nagios-Plugin-Base.t | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | use strict; | ||
3 | use Test::More tests => 11; | ||
4 | |||
5 | use_ok("Nagios::Plugin::Base"); | ||
6 | my $this_version=$Nagios::Plugin::Base::VERSION; | ||
7 | foreach my $m ("", qw(::Threshold ::Getopt ::Performance ::Range)) { | ||
8 | my $mod = "Nagios::Plugin$m"; | ||
9 | use_ok($mod); | ||
10 | # Lots of hackery below. Easier to say $mod->VERSION, but this is probably a recent perl thing | ||
11 | my $v = "$mod"."::VERSION"; | ||
12 | my $a = eval "\$$v"; | ||
13 | is($a, $this_version, "Version number for $mod the same as Base: $this_version"); | ||
14 | } | ||