X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDirHandle.t;h=35a7ea86c3d1dfd4224d97ee765d57613a61ed7b;hb=55b6781562aff32ef6499c4f263ab251254ca5cb;hp=b654f6d384ac9f3f1322b589b90bfbd7b052f5d0;hpb=a31638381a2c454a53ba8572b431fb8aae70ac33;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/DirHandle.t b/lib/DirHandle.t index b654f6d..35a7ea8 100755 --- a/lib/DirHandle.t +++ b/lib/DirHandle.t @@ -15,6 +15,15 @@ require './test.pl'; plan(5); +# Fetching the list of files in two different ways and expecting them +# to be the same is a race condition when tests are running in parallel. +# So go somewhere quieter. +my $chdir; +if ($ENV{PERL_CORE} && -d 'uni') { + chdir 'uni'; + $chdir++; +}; + $dot = new DirHandle ($^O eq 'MacOS' ? ':' : '.'); ok(defined($dot)); @@ -33,3 +42,7 @@ cmp_ok(+(join("\0", @b), 'eq', join("\0", @c))); $dot->close; $dot->rewind; ok(!defined($dot->read)); + +if ($chdir) { + chdir ".."; +}