use
lib
'..'
,
'../blib/lib'
,
'../blib/arch'
;
BEGIN {$| = 1;
print
"1..3\n"
; $^W = 1; }
END {
print
"not ok 1\n"
unless
$loaded
;}
$loaded
= 1;
print
"ok 1\n"
;
$ENV
{REQUEST_METHOD} =
'GET'
;
$ENV
{QUERY_STRING} =
'game=chess&game=checkers&weather=dull'
;
$ENV
{PATH_INFO} =
'/somewhere/else'
;
$ENV
{PATH_TRANSLATED} =
'/usr/local/somewhere/else'
;
$ENV
{SCRIPT_NAME} =
'/cgi-bin/foo.cgi'
;
$ENV
{SERVER_PROTOCOL} =
'HTTP/1.0'
;
$ENV
{SERVER_PORT} = 8080;
$ENV
{SERVER_NAME} =
'the.good.ship.lollypop.com'
;
$ENV
{REQUEST_URI} =
"$ENV{SCRIPT_NAME}$ENV{PATH_INFO}?$ENV{QUERY_STRING}"
;
$ENV
{HTTP_LOVE} =
'true'
;
$ENV
{DOCUMENT_ROOT} =
'/home/puffy/public_html'
;
$ENV
{HTTP_HOST} =
'www.puffy.dom'
;
my
$rc
=
'./eg/dot_lwrc'
;
sub
test {
local
($^W) = 0;
my
(
$num
,
$true
,
$msg
) =
@_
;
print
(
$true
?
"ok $num\n"
:
"not ok $num $msg\n"
);
}
eval
"use LibWeb::File"
;
test(2, !$@,
"Could not load LibWeb::File module. $@"
);
my
$fh
;
eval
{
my
$fh
= LibWeb::File->new(); };
test(3, !$@,
"LibWeb::File cannot be instantiated. $@"
);