More Cygwin filesystem semantics.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 23 Jun 2001 14:02:14 +0000 (14:02 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 23 Jun 2001 14:02:14 +0000 (14:02 +0000)
p4raw-id: //depot/perl@10862

t/io/fs.t
t/op/stat.t

index 091bd44..2a14377 100755 (executable)
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -10,7 +10,7 @@ BEGIN {
 use Config;
 
 $Is_Dosish = ($^O eq 'MSWin32' or $^O eq 'NetWare' or $^O eq 'dos' or
-             $^O eq 'os2' or $^O eq 'mint');
+             $^O eq 'os2' or $^O eq 'mint' or $^O eq 'cygwin');
 
 if (defined &Win32::IsWinNT && Win32::IsWinNT()) {
     $Is_Dosish = '' if Win32::FsType() eq 'NTFS';
@@ -111,7 +111,7 @@ if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";}
     $blksize,$blocks) = stat('b');
 if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { print "ok 17 # skipped: bogus (stat)[1]\n"; }
 elsif ($ino) {print "ok 17\n";} else {print "not ok 17\n";}
-if ($wd =~ m#$Config{'afsroot'}/# || $^O eq 'amigaos' || $^O eq 'dos' || $^O eq 'MSWin32' || $^O eq 'NetWare')
+if ($wd =~ m#$Config{'afsroot'}/# || $^O eq 'amigaos' || $^O eq 'dos' || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'cygwin')
     {print "ok 18 # skipped: granularity of the filetime\n";}
 elsif ($atime == 500000000 && $mtime == 500000000 + $delta)
     {print "ok 18\n";}
index f3cf2ef..7a2690c 100755 (executable)
@@ -14,8 +14,8 @@ print "1..58\n";
 $Is_MSWin32 = $^O eq 'MSWin32';
 $Is_NetWare = $^O eq 'NetWare';
 $Is_Dos = $^O eq 'dos';
-$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32 || $Is_NetWare;
 $Is_Cygwin = $^O eq 'cygwin';
+$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin;
 chop($cwd = (($Is_MSWin32 || $Is_NetWare) ? `cd` : `pwd`));
 
 $DEV = `ls -l /dev` unless $Is_Dosish or $Is_Cygwin;
@@ -101,7 +101,7 @@ $olduid = $>;               # can't test -r if uid == 0
 $Is_MSWin32 ? `cmd /c echo hi > Op.stat.tmp` : `echo hi >Op.stat.tmp`;
 chmod 0,'Op.stat.tmp';
 eval '$> = 1;';                # so switch uid (may not be implemented)
-if (!$> || $Is_Dos || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";}
+if (!$> || $Is_Dos || $Is_Cygwin || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";}
 if (!$> || ! -w 'Op.stat.tmp') {print "ok 10\n";} else {print "not ok 10\n";}
 eval '$> = $olduid;';          # switch uid back (may not be implemented)
 print "# olduid=$olduid, newuid=$>\n" unless ($> == $olduid);