From: Nick Ing-Simmons Date: Fri, 25 Jan 2002 19:05:57 +0000 (+0000) Subject: More Win32 tuning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5b53b20fa4fb4addda7b1ca4ad0ea6095f136b8;p=p5sagit%2Fp5-mst-13.2.git More Win32 tuning p4raw-id: //depot/perlio@14421 --- diff --git a/t/op/stat.t b/t/op/stat.t index 82566a8..dac954a 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -49,7 +49,7 @@ SKIP: { } SKIP: { - skip "mtime and ctime not reliable", 2 + skip "mtime and ctime not reliable", 2 if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos; ok( $mtime, 'mtime' ); @@ -88,19 +88,23 @@ SKIP: { SKIP: { my $cwd = File::Spec->rel2abs($Curdir); - skip "Solaris tmpfs has different mtime/ctime link semantics", 2 - if $Is_Solaris and $cwd =~ m#^/tmp# and + skip "Solaris tmpfs has different mtime/ctime link semantics", 2 + if $Is_Solaris and $cwd =~ m#^/tmp# and $mtime && $mtime == $ctime; skip "AFS has different mtime/ctime link semantics", 2 if $cwd =~ m#$Config{'afsroot'}/#; skip "AmigaOS has different mtime/ctime link semantics", 2 if $Is_Amiga; - + # Win32 could pass $mtime test but as FAT and NTFS have + # no ctime concept $ctime is ALWAYS == $mtime + # expect netware to be the same ... + skip "No ctime concept on this OS", 2 + if $Is_MSWin32; if( !ok($mtime, 'hard link mtime') || !isnt($mtime, $ctime, 'hard link ctime != mtime') ) { print <; eval { $> = 1; }; - skip "Can't test -r or -w meaningfully if you're superuser", 2 + skip "Can't test -r or -w meaningfully if you're superuser", 2 if $> == 0; SKIP: { @@ -199,7 +203,7 @@ SKIP: { skip "/dev isn't available to test against", 3 unless -d '/dev' && -r '/dev' && -x '/dev'; - my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l"; + my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l"; my $CMD = "$LS /dev 2>/dev/null"; my $DEV = qx($CMD); @@ -283,7 +287,7 @@ SKIP: { skip "Test uses unixisms", 2 if $Is_MSWin32 || $Is_NetWare; skip "No TTY to test -t with", 2 unless -e $TTY; - open(TTY, $TTY) || + open(TTY, $TTY) || warn "Can't open $TTY--run t/TEST outside of make.\n"; ok(-t TTY, '-t'); ok(-c TTY, 'tty is -c'); @@ -300,6 +304,7 @@ SKIP: { my $Null = File::Spec->devnull; SKIP: { skip "No null device to test with", 1 unless -e $Null; + skip "We know Win32 thinks '$Null' is a TTY", 1 if $Is_MSWin32; open(NULL, $Null) or DIE("Can't open $Null: $!"); ok(! -t NULL, 'null device is not a TTY'); @@ -368,4 +373,3 @@ unlink $tmpfile or print "# unlink failed: $!\n"; # bug id 20011101.069 my @r = \stat("."); is(scalar @r, 13, 'stat returns full 13 elements'); - diff --git a/t/op/taint.t b/t/op/taint.t index 21cf2fa..7c83019 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -919,7 +919,10 @@ ok( $@ =~ /^Modification of a read-only value attempted/, test 182, tainted $re3; } - +if ($Is_MSWin32) { + print "ok 183 # Skipped: system {} has different semantics\n"; +} +else { # bug 20010221.005 local $ENV{PATH} .= $TAINT;