X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=t%2Fdriver.t;h=36ae5ef2f9fe130ae2838cc9491d07dc56955dfe;hp=7e12204cf666c4be5684da0774360d961545af59;hb=0ad7d4599157a22a4ac1526a20a463a9a9d21061;hpb=01cb97d37f6138597c4bc61911241ad4ab500727 diff --git a/t/driver.t b/t/driver.t index 7e12204..36ae5ef 100755 --- a/t/driver.t +++ b/t/driver.t @@ -7,6 +7,7 @@ use Test::More qw( no_plan ); use File::Copy; use File::Compare; +use File::Find; use Cwd; use YAML; @@ -38,6 +39,8 @@ for my $testdir (@tests) { system("perl -pi -e 's{/Library/WebServer/Documents/blosxom}{$cwd/data}' blosxom.cgi") == 0 or die "$!"; + touch_files (); + for (@{$spec->{tests}}) { my ($args, $output) = @$_; @@ -59,3 +62,14 @@ for my $testdir (@tests) { chdir $orig_cwd; } + + +sub touch_files { + find( sub { + if (/^(.*)\.(\d+)$/) { + copy($_, $1); + `touch -t $2 $1`; + } + }, + "./data"); +}