From: George Greer Date: Sat, 3 Oct 2009 00:12:08 +0000 (-0400) Subject: Avoid false negatives on Win32 with Shell.t tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0a59c98f4f34ddeebddf2659e1f796d77278ecc;p=p5sagit%2Fp5-mst-13.2.git Avoid false negatives on Win32 with Shell.t tests. On DOS and Windows, the 'dir' command includes the number of bytes free on the filesystem so when t/Shell.t tries to compare two different 'dir' outputs the test can fail because of other, unrelated activity on the filesystem. Message-ID: alpine.LFD.2.00.0910022024380.18604@ein.m-l.org --- diff --git a/cpan/Shell/t/Shell.t b/cpan/Shell/t/Shell.t index 1ebc861..cc6f616 100644 --- a/cpan/Shell/t/Shell.t +++ b/cpan/Shell/t/Shell.t @@ -46,10 +46,10 @@ if ($Is_VMS) { ok(!$@, '2 methods calls'); } elsif ($Is_MSWin32) { ok(dir(), 'Execute command'); - my @files = dir('*.*'); + my @files = grep !/bytes free$/, dir('*.*'); ok(@files, 'Quoted arguments'); - ok(eq_array(\@files, [$so->dir('*.*')]), 'object method'); + ok(eq_array(\@files, [grep !/bytes free$/, $so->dir('*.*')]), 'object method'); eval { $so->dir }; ok(!$@, '2 methods calls'); } else {