Skip to content

Commit

Permalink
runCommand no_stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonéri Le Bouder committed Oct 1, 2012
1 parent a4ab777 commit 3ac635d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions lib/FusionInventory/Agent/Tools/Win32.pm
Expand Up @@ -202,7 +202,6 @@ sub runCommand {

my $args = {
stdout => $buff,
stderr => $params{no_stderr} ? $void : $buff,
no_window => 1
};

Expand Down Expand Up @@ -305,7 +304,6 @@ Returns a command in a Win32 Process
=item timeout a time in second, default is 3600*2
=item no_stderr ignore STDERR output, default is false
=back
Return an array
Expand Down
7 changes: 1 addition & 6 deletions t/tools/win32.t
Expand Up @@ -17,7 +17,7 @@ use FusionInventory::Agent::Tools::Win32;
if ($OSNAME ne 'MSWin32') {
plan skip_all => 'depend on Win32';
} else {
plan tests => 5;
plan tests => 4;
}
my ($code, $fd) = runCommand(command => "perl -V");
ok($code eq 0, "perl -V returns 0");
Expand All @@ -36,9 +36,4 @@ my $command = "perl -BAD";
command => $command,
no_stderr => 1
);
ok(!defined(<$fd>), "no_stderr=1: don't catch STDERR output");
($code, $fd) = runCommand(
command => $command,
no_stderr => 0
);
ok(defined(<$fd>), "no_stderr=0: catch STDERR output");

0 comments on commit 3ac635d

Please sign in to comment.