This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
stat access time is wrong on Win95
authorNikola Knezevic <indy@tesla.rcub.bg.ac.yu>
Tue, 18 Sep 2001 21:59:24 +0000 (23:59 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 18 Sep 2001 22:52:24 +0000 (22:52 +0000)
Message-ID: <413158386.20010918215924@tesla.rcub.bg.ac.yu>

p4raw-id: //depot/perl@12077

lib/ExtUtils/Command.pm
lib/ExtUtils/Command.t

index 5e78602..b7b41cd 100644 (file)
@@ -108,8 +108,8 @@ Makes files exist, with current timestamp
 
 sub touch
 {
- expand_wildcards();
  my $t    = time;
+ expand_wildcards();
  while (@ARGV)
   {
    my $file = shift(@ARGV);               
index d1522d3..01c0046 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
        File::Path::rmtree( 'ecmddir' );
 }
 
-use Test::More tests => 22;
+use Test::More tests => 21;
 use File::Spec;
 
 SKIP: {
@@ -63,6 +63,7 @@ SKIP: {
 
        # these are destructive, have to keep setting @ARGV
        @ARGV = ( 'ecmdfile' );
+        my $now = time;
        touch();
 
        @ARGV = ( 'ecmdfile' );
@@ -71,11 +72,8 @@ SKIP: {
        @ARGV = ( 'ecmdfile' );
        ok( -e $ARGV[0], 'created!' );
 
-       # use utime to set the timestamps
-       $ARGV[1] = (my $now = time);
-       utime();
-
-       is( (stat($ARGV[0]))[8], $now, 'checking access time stamp' );
+       # Just checking modify time stamp, access time stamp is set
+       # to the beginning of the day in Win95
        is( (stat($ARGV[0]))[9], $now, 'checking modify time stamp' );
 
        # change a file to read-only