From: Jarkko Hietaniemi Date: Sat, 23 Jun 2001 14:02:14 +0000 (+0000) Subject: More Cygwin filesystem semantics. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=897bbb29228096eca0e16e9cb740eb1889ac8b3a;p=p5sagit%2Fp5-mst-13.2.git More Cygwin filesystem semantics. p4raw-id: //depot/perl@10862 --- diff --git a/t/io/fs.t b/t/io/fs.t index 091bd44..2a14377 100755 --- 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";} diff --git a/t/op/stat.t b/t/op/stat.t index f3cf2ef..7a2690c 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -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);