summaryrefslogtreecommitdiffstats
path: root/t/Nagios-Plugin-05.t
diff options
context:
space:
mode:
authortonvoon <ton.voon@opsera.com>2010-04-15 08:50:30 (GMT)
committertonvoon <ton.voon@opsera.com>2010-04-15 08:50:30 (GMT)
commitd2ea3cc29ea66a29d6dfa54dcd394d972ae97ef8 (patch)
tree23221bc6464ea139a6b28d17189f1775daae0eb5 /t/Nagios-Plugin-05.t
parenta625872ee35399c0ff69d95d8695feecaab7e79c (diff)
downloadmonitoring-plugin-perl-d2ea3cc29ea66a29d6dfa54dcd394d972ae97ef8.tar.gz
Test for exported variable %STATUS_TEXT (Andrew Ford - RT46048)
Diffstat (limited to 't/Nagios-Plugin-05.t')
-rw-r--r--t/Nagios-Plugin-05.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/Nagios-Plugin-05.t b/t/Nagios-Plugin-05.t
new file mode 100644
index 0000000..cc602cc
--- /dev/null
+++ b/t/Nagios-Plugin-05.t
@@ -0,0 +1,16 @@
1# Check for exported vars
2# Can't include Nagios::Plugin::Functions because it also exports %STATUS_TEXT
3
4use strict;
5use Test::More tests=>4;
6
7BEGIN { use_ok('Nagios::Plugin') };
8
9eval ' $_ = $STATUS_TEXT{0} ';
10like( $@, '/Global symbol "%STATUS_TEXT" requires explicit package name/' );
11
12use_ok("Nagios::Plugin", qw(%STATUS_TEXT));
13
14eval ' $_ = $STATUS_TEXT{0} ';
15is( $@, '' );
16