diff options
| author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-23 02:39:45 -0500 |
|---|---|---|
| committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-23 02:43:59 -0500 |
| commit | 8b103c0c778aa22dbe7688e7d11df20b7c80be70 (patch) | |
| tree | de74e84102e6f693560b301971bb2b6ee1d05a98 /lib/tests/test_opts3.t | |
| parent | 485f306868fa9c89b4f09e3b2b813d93ec64f0b4 (diff) | |
| download | monitoring-plugins-8b103c0c778aa22dbe7688e7d11df20b7c80be70.tar.gz | |
Add die tests for parse_ini
Diffstat (limited to 'lib/tests/test_opts3.t')
| -rwxr-xr-x | lib/tests/test_opts3.t | 8 |
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); | |||
| 28 | my $count=1; | 28 | my $count=1; |
| 29 | 29 | ||
| 30 | foreach my $args (@TESTS) { | 30 | foreach 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 | } |
