#!/usr/bin/perl use warnings; $^W = 1; use strict; use Apache::Test ':withtestmore'; use Test::More; use Apache::TestConfig; use Apache::TestRequest qw(GET); plan tests => 8; my ($res, $body); $res = GET '/dir/'; $body = $res->content; is($body, <

Body of the index.html.

EOF $res = GET '/dir/index.html'; $body = $res->content; is($body, <

Body of the index.html.

EOF $res = GET '/dir'; $body = $res->content; is($body, <

Body of the index.html.

EOF $res = GET '/my.html'; $body = $res->content; is($body, <

Paragraph.

EOF $res = GET '/file'; $body = $res->content; is($body, "Krtek.\n", "GET /file should give us the text file."); $res = GET '/nonexistent'; is($res->code, 404, "The URL should not exist"); is($res->header('Content-Type'), 'text/html; charset=iso-8859-1', 'The error message content type'); $body = $res->content; is($body, < 404 Not Found

Not Found

The requested URL /nonexistent was not found on this server.

EOF