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 ($_) {
|