From 020f1277ffc53225b7333c5339d7230281c0fb5a Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Apr 2021 19:42:04 +0000 Subject: Remove test {head,foot}.html files, just create them when testing This feels a bit cleaner and puts (most) everything in one place. --- MANIFEST | 2 -- t/basic.t | 27 +++++++++++++++------------ t/htdocs/foot.html | 2 -- t/htdocs/head.html | 2 -- 4 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 t/htdocs/foot.html delete mode 100644 t/htdocs/head.html diff --git a/MANIFEST b/MANIFEST index 4449fbf..fc41555 100644 --- a/MANIFEST +++ b/MANIFEST @@ -7,6 +7,4 @@ README t/basic.t t/conf/extra.conf.in t/conf/extra.last.conf.in -t/htdocs/foot.html -t/htdocs/head.html t/TEST.PL diff --git a/t/basic.t b/t/basic.t index 231c491..8e5a37b 100644 --- a/t/basic.t +++ b/t/basic.t @@ -13,18 +13,6 @@ my $head; # expected page header my $foot; # expected page footer my @body; # sections of page body -mkdir 't/htdocs/subdir' if ! -d 't/htdocs/subdir'; - -# Read contents of header and footer - -open my $h, '<', 't/htdocs/head.html' - or die "Could not open < t/htdocs/head.html: $!"; -open my $f, '<', 't/htdocs/foot.html' - or die "Could not open < t/htdocs/foot.html: $!"; -$head = do { local $/; <$h> }; -$foot = do { local $/; <$f> }; -close $h; close $f; - # Helper for replacing file contents sub overwrite { @@ -36,6 +24,18 @@ sub overwrite { # Run tests +mkdir 't/htdocs/subdir' if ! -d 't/htdocs/subdir'; + +$head = < -

Copyright © Site Owner

diff --git a/t/htdocs/head.html b/t/htdocs/head.html deleted file mode 100644 index b4abf3f..0000000 --- a/t/htdocs/head.html +++ /dev/null @@ -1,2 +0,0 @@ -

Site Header

-
-- cgit v1.2.3