From 3ac635de72fddb6f93ee2b01a7415ddd5971ea41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Mon, 1 Oct 2012 12:14:34 +0200 Subject: [PATCH] runCommand no_stderr --- lib/FusionInventory/Agent/Tools/Win32.pm | 2 -- t/tools/win32.t | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/FusionInventory/Agent/Tools/Win32.pm b/lib/FusionInventory/Agent/Tools/Win32.pm index 69495d249a..9ff1cf2dac 100644 --- a/lib/FusionInventory/Agent/Tools/Win32.pm +++ b/lib/FusionInventory/Agent/Tools/Win32.pm @@ -202,7 +202,6 @@ sub runCommand { my $args = { stdout => $buff, - stderr => $params{no_stderr} ? $void : $buff, no_window => 1 }; @@ -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 diff --git a/t/tools/win32.t b/t/tools/win32.t index bc800e2b53..03fe2da689 100755 --- a/t/tools/win32.t +++ b/t/tools/win32.t @@ -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"); @@ -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");