summaryrefslogtreecommitdiffstats
path: root/lib/tests/test_opts3.t
diff options
context:
space:
mode:
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 35b44687..fa7876d0 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}