From 0be7dc4cd381264751503b3294fb78ba43eb7284 Mon Sep 17 00:00:00 2001 From: Kevin Scaldeferri Date: Sat, 29 Jul 2006 01:04:17 +0000 Subject: [PATCH 1/1] rejiggered things to deal with changing timestamps --- t/driver.t | 14 ++++++++++++++ .../data/foo/{bar.txt => bar.txt.200607251102} | 0 .../data/foo/{baz.txt => baz.txt.200607251103} | 0 t/t-smoketest/data/{1.txt => 1.txt.200607192254} | 0 t/t-templates/data/{1.txt => 1.txt.200607192254} | 0 5 files changed, 14 insertions(+) rename t/t-permalinks/data/foo/{bar.txt => bar.txt.200607251102} (100%) rename t/t-permalinks/data/foo/{baz.txt => baz.txt.200607251103} (100%) rename t/t-smoketest/data/{1.txt => 1.txt.200607192254} (100%) rename t/t-templates/data/{1.txt => 1.txt.200607192254} (100%) 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"); +} diff --git a/t/t-permalinks/data/foo/bar.txt b/t/t-permalinks/data/foo/bar.txt.200607251102 similarity index 100% rename from t/t-permalinks/data/foo/bar.txt rename to t/t-permalinks/data/foo/bar.txt.200607251102 diff --git a/t/t-permalinks/data/foo/baz.txt b/t/t-permalinks/data/foo/baz.txt.200607251103 similarity index 100% rename from t/t-permalinks/data/foo/baz.txt rename to t/t-permalinks/data/foo/baz.txt.200607251103 diff --git a/t/t-smoketest/data/1.txt b/t/t-smoketest/data/1.txt.200607192254 similarity index 100% rename from t/t-smoketest/data/1.txt rename to t/t-smoketest/data/1.txt.200607192254 diff --git a/t/t-templates/data/1.txt b/t/t-templates/data/1.txt.200607192254 similarity index 100% rename from t/t-templates/data/1.txt rename to t/t-templates/data/1.txt.200607192254 -- 2.30.2