From 42ddf87fb0f83ca4b7897e2c3e486c571494d978 Mon Sep 17 00:00:00 2001 From: Gavin Carr Date: Fri, 18 Jun 2010 22:51:12 +0100 Subject: [PATCH] Fix minor errors with t/static_basic unit tests. --- t/driver | 5 +++-- t/static_basic/expected/2006/07/19/index.rss | 4 ++-- t/static_basic/expected/2006/07/index.rss | 4 ++-- t/static_basic/expected/2006/index.rss | 4 ++-- t/static_basic/expected/index.rss | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) 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. -- 2.30.2