summaryrefslogtreecommitdiffstats
path: root/lib/tests/test_opts3.t
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-23 07:39:45 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-23 07:43:59 (GMT)
commit8b103c0c778aa22dbe7688e7d11df20b7c80be70 (patch)
treede74e84102e6f693560b301971bb2b6ee1d05a98 /lib/tests/test_opts3.t
parent485f306868fa9c89b4f09e3b2b813d93ec64f0b4 (diff)
downloadmonitoring-plugins-8b103c0c778aa22dbe7688e7d11df20b7c80be70.tar.gz
Add die tests for parse_ini
Diffstat (limited to 'lib/tests/test_opts3.t')
-rwxr-xr-xlib/tests/test_opts3.t8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tests/test_opts3.t b/lib/tests/test_opts3.t
index 35b4468..fa7876d 100755
--- a/lib/tests/test_opts3.t
+++ b/lib/tests/test_opts3.t
@@ -28,8 +28,12 @@ plan tests => scalar(@TESTS);
28my $count=1; 28my $count=1;
29 29
30foreach my $args (@TESTS) { 30foreach my $args (@TESTS) {
31 my $rc = shift(@$args); 31 my $rc = shift(@$args);
32 $ENV{"NAGIOS_CONFIG_PATH"} = shift(@$args); 32 if (my $env = shift(@$args)) {
33 $ENV{"NAGIOS_CONFIG_PATH"} = $env;
34 } else {
35 delete($ENV{"NAGIOS_CONFIG_PATH"});
36 }
33 system {'./test_opts3'} @$args; 37 system {'./test_opts3'} @$args;
34 cmp_ok($?>>8, '==', $rc, "Extra-opts die " . $count++); 38 cmp_ok($?>>8, '==', $rc, "Extra-opts die " . $count++);
35} 39}