ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / cp.t
CommitLineData
8bdaab24 1#!/usr/bin/perl -w
2
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 chdir 't';
6 @INC = ('../lib', 'lib/');
7 }
8 else {
9 unshift @INC, 't/lib/';
10 }
11}
12chdir 't';
13
14use ExtUtils::Command;
15use Test::More tests => 1;
16
17open FILE, ">source" or die $!;
18print FILE "stuff\n";
19close FILE;
20
21# Instead of sleeping to make the file time older
22utime time - 900, time - 900, "source";
23
24END { 1 while unlink "source", "dest"; }
25
26# Win32 bug, cp wouldn't update mtime.
27{
28 local @ARGV = qw(source dest);
29 cp();
30 my $mtime = (stat("dest"))[9];
31 my $now = time;
32 cmp_ok( abs($mtime - $now), '<=', 1, 'cp updated mtime' );
33}