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