lib/ExtUtils/t/dir_target.t Verify if dir_target() is supported
lib/ExtUtils/t/Embed.t See if ExtUtils::Embed and embedding works
lib/ExtUtils/testlib.pm Fixes up @INC to use just-built extension
+lib/ExtUtils/t/cp.t See if ExtUtils::Command works
lib/ExtUtils/t/eu_command.t See if ExtUtils::Command works
lib/ExtUtils/t/FIRST_MAKEFILE.t See if FIRST_MAKEFILE works
lib/ExtUtils/t/fixin.t See if ExtUtils::MakeMaker works
@ISA = qw(Exporter);
@EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f test_d chmod
dos2unix);
-$VERSION = '1.14';
+$VERSION = '1.15';
+
+my $Is_VMS = $^O eq 'VMS';
+my $Is_Win32 = $^O eq 'MSWin32';
-my $Is_VMS = $^O eq 'VMS';
=head1 NAME
my $nok = 0;
foreach my $src (@src) {
$nok ||= !copy($src,$dst);
+
+ # Win32 does not update the mod time of a copied file, just the
+ # created time which make does not look at.
+ utime(time, time, $dst) if $Is_Win32;
}
return $nok;
}
--- /dev/null
+#!/usr/bin/perl -w
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't';
+ @INC = ('../lib', 'lib/');
+ }
+ else {
+ unshift @INC, 't/lib/';
+ }
+}
+chdir 't';
+
+use ExtUtils::Command;
+use Test::More tests => 1;
+
+open FILE, ">source" or die $!;
+print FILE "stuff\n";
+close FILE;
+
+# Instead of sleeping to make the file time older
+utime time - 900, time - 900, "source";
+
+END { 1 while unlink "source", "dest"; }
+
+# Win32 bug, cp wouldn't update mtime.
+{
+ local @ARGV = qw(source dest);
+ cp();
+ my $mtime = (stat("dest"))[9];
+ my $now = time;
+ cmp_ok( abs($mtime - $now), '<=', 1, 'cp updated mtime' );
+}
File::Path::rmtree( 'ecmddir' );
}
-BEGIN {
- use Test::More tests => 41;
- use File::Spec;
-}
+use Test::More tests => 40;
+use File::Spec;
BEGIN {
# bad neighbor, but test_f() uses exit()
@ARGV = ( $Testfile );
is( test_f(), 1, 'testing non-existent file' );
- @ARGV = ( $Testfile );
- is( ! test_f(), '', 'testing non-existent file' );
-
# these are destructive, have to keep setting @ARGV
@ARGV = ( $Testfile );
touch();
SKIP: {
if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
$^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' ||
- $^O eq 'MacOS' || $^O eq 'vos'
+ $^O eq 'MacOS'
) {
skip( "different file permission semantics on $^O", 5);
}