aboutsummaryrefslogtreecommitdiff
path: root/t/basic.t
diff options
context:
space:
mode:
authorroot <root@rbsd.ankarstrom.se>2021-04-24 00:56:05 +0000
committerroot <root@rbsd.ankarstrom.se>2021-04-24 01:11:06 +0000
commit72c681d3a16a706b0a3dd2b6dda95edcb4f78f51 (patch)
tree980d08083ae4e5208c85d54bd34f01457f721fb3 /t/basic.t
parent5cfdae7ccf1eece314c381d8de52acd2aee7cff9 (diff)
downloadApache-Inject-72c681d3a16a706b0a3dd2b6dda95edcb4f78f51.tar.gz
Add Makefile, basic test
Diffstat (limited to 't/basic.t')
-rw-r--r--t/basic.t21
1 files changed, 21 insertions, 0 deletions
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';