From: Prymmer/Kahn Date: Sat, 21 Jul 2001 12:08:29 +0000 (-0700) Subject: Win32 update for t/io/fs.t (may effect NetWare) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7054c437fe115078675d7707454dda4600a840da;p=p5sagit%2Fp5-mst-13.2.git Win32 update for t/io/fs.t (may effect NetWare) Message-ID: p4raw-id: //depot/perl@11436 --- diff --git a/t/io/fs.t b/t/io/fs.t index 3ecfe7f..1c47154 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -136,7 +136,9 @@ unlink 'c'; chdir $wd || die "Can't cd back to $wd"; unlink 'c'; -if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>/dev/null` =~ /^l.*->/) { +# Yet another way to look for links (perhaps those that cannot be created by perl?). +# Hopefully there is an ls utility in your %PATH%. N.B. that $^O is 'cygwin' on Cygwin. +if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>nul` =~ /^l.*->/) { # we have symbolic links system("cp TEST TEST$$"); # we have to copy because e.g. GNU grep gets huffy if we have @@ -149,7 +151,12 @@ if ((($^O eq 'MSWin32') || ($^O eq 'NetWare')) and `ls -l perl 2>/dev/null` =~ / unlink("TEST$$"); } else { - print "ok 21\nok 22\n"; + if ( ($^O eq 'MSWin32') || ($^O eq 'NetWare') ) { + print "ok 21 # skipped: no link\nok 22 # skipped: no link\n"; + } + else { + print "ok 21 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\nok 22 # skipped: $^O is neither 'MSWin32' nor 'NetWare'\n"; + } } # truncate (may not be implemented everywhere)