File: check_multi-test.patch

package info (click to toggle)
nagios-plugin-check-multi 0.26-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,172 kB
  • sloc: perl: 2,296; makefile: 415; sh: 239
file content (28 lines) | stat: -rw-r--r-- 831 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix 'Option s requires an argument' test.
 Expected output on STDERR instead of STDOUT.
Author: Bas Couwenberg <sebastic@debian.org>
Bug-Debian: https://bugs.debian.org/808737
Forwarded: https://github.com/flackem/check_multi/pull/17

--- a/plugins/t/10_check_multi.t.in
+++ b/plugins/t/10_check_multi.t.in
@@ -866,7 +866,7 @@ is(
 );
 like(
 	$result->output,
-	'/^Usage:/',
+	'/Option s requires an argument/',
 	"output correct",
 );
 #-------------------------------------------------------------------------------
--- a/plugins/t/NPTest.pm
+++ b/plugins/t/NPTest.pm
@@ -617,7 +617,7 @@ sub testCmd {
 	my $command = shift or die "No command passed to testCmd";
 	my $object = $class->new;
 	
-	my $output = `$command`;
+	my $output = `$command 2>&1`;
 	$object->return_code($? >> 8);
 	$_ = $? & 127;
 	if ($_) {