From: Gavin Carr Date: Fri, 18 Jun 2010 21:51:12 +0000 (+0100) Subject: Fix minor errors with t/static_basic unit tests. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=commitdiff_plain;h=42ddf87fb0f83ca4b7897e2c3e486c571494d978;hp=677f2b6b058b1ffea5ebf44dc6131621449514fc Fix minor errors with t/static_basic unit tests. --- diff --git a/t/driver b/t/driver index 52fc128..c1e9a55 100644 --- a/t/driver +++ b/t/driver @@ -69,7 +69,8 @@ if ($static_password) { skip "Static tests require 'expected' directory", 1 unless $expected; $expected = "$blosxom_config_dir/../$expected" unless $expected =~ m!^/!; skip "Static tests 'expected' directory is missing", 1 unless -d $expected; - skip "Static tests 'static_dir' directory is missing", 1 unless -d $static_dir; + -d $static_dir or mkdir $static_dir + or die "mkdir on static_dir '$static_dir' failed: $!"; File::Remove::remove(\1, "$static_dir/*"); @@ -80,7 +81,7 @@ if ($static_password) { my ($a_short, $b_short) = ($a, $b); $a_short =~ s!^.*\.\./!! if $a_short; $b_short =~ s!^.*\.\./!! if $b_short; - return if $b =~ m! /CVS$ !x; + return if $b && $b =~ m! /CVS$ !x; if (! $b) { fail("$a_short has no corresponding file"); } elsif (! $a) { diff --git a/t/static_basic/expected/2006/07/19/index.rss b/t/static_basic/expected/2006/07/19/index.rss index 4d9eb5b..073abbe 100644 --- a/t/static_basic/expected/2006/07/19/index.rss +++ b/t/static_basic/expected/2006/07/19/index.rss @@ -6,14 +6,14 @@ Yet another Blosxom weblog. en http://blogs.law.harvard.edu/tech/rss - blosxom/2.1.0 + blosxom/2.1.2+dev Lorem ipsum Wed, 19 Jul 2006 22:54:00 +0000 http://localhost/2006/07/19#1 - /1 + http://localhost/1 Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. diff --git a/t/static_basic/expected/2006/07/index.rss b/t/static_basic/expected/2006/07/index.rss index 4d9eb5b..073abbe 100644 --- a/t/static_basic/expected/2006/07/index.rss +++ b/t/static_basic/expected/2006/07/index.rss @@ -6,14 +6,14 @@ Yet another Blosxom weblog. en http://blogs.law.harvard.edu/tech/rss - blosxom/2.1.0 + blosxom/2.1.2+dev Lorem ipsum Wed, 19 Jul 2006 22:54:00 +0000 http://localhost/2006/07/19#1 - /1 + http://localhost/1 Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. diff --git a/t/static_basic/expected/2006/index.rss b/t/static_basic/expected/2006/index.rss index 4d9eb5b..073abbe 100644 --- a/t/static_basic/expected/2006/index.rss +++ b/t/static_basic/expected/2006/index.rss @@ -6,14 +6,14 @@ Yet another Blosxom weblog. en http://blogs.law.harvard.edu/tech/rss - blosxom/2.1.0 + blosxom/2.1.2+dev Lorem ipsum Wed, 19 Jul 2006 22:54:00 +0000 http://localhost/2006/07/19#1 - /1 + http://localhost/1 Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. diff --git a/t/static_basic/expected/index.rss b/t/static_basic/expected/index.rss index 4d9eb5b..073abbe 100644 --- a/t/static_basic/expected/index.rss +++ b/t/static_basic/expected/index.rss @@ -6,14 +6,14 @@ Yet another Blosxom weblog. en http://blogs.law.harvard.edu/tech/rss - blosxom/2.1.0 + blosxom/2.1.2+dev Lorem ipsum Wed, 19 Jul 2006 22:54:00 +0000 http://localhost/2006/07/19#1 - /1 + http://localhost/1 Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto. Lorem ipsum dolor sit amet ipso facto.Lorem ipsum dolor sit amet ipso facto.