From 72c681d3a16a706b0a3dd2b6dda95edcb4f78f51 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 24 Apr 2021 00:56:05 +0000 Subject: Add Makefile, basic test --- t/basic.t | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 t/basic.t (limited to 't/basic.t') diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..f6e289f --- /dev/null +++ b/t/basic.t @@ -0,0 +1,21 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; +use Apache::TestUtil; +use Apache::TestRequest qw/GET_BODY/; + +plan tests => 2; + +ok 1; + +open my $t, '<', 't/htdocs/test.html' or die; +open my $h, '<', 't/htdocs/head.html' or die; +open my $f, '<', 't/htdocs/foot.html' or die; +my $test = do { local $/; <$t> }; +my $head = do { local $/; <$h> }; +my $foot = do { local $/; <$f> }; +close $t; close $h; close $f; + +my $body = GET_BODY '/test.html'; +ok $body, "$head$test$foot", 'Body of test.html includes header and footer'; -- cgit v1.2.3