Apache2-SSI
view release on metacpan or search on metacpan
name => 'positive value of string "off"',
uri => "${BASE_URI}/03.15.if.html",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*https:\/\/ja-jp.example.com[[:blank:]\h\v]*$/,
name => 'using regex back reference',
uri => "${BASE_URI}/03.16.if.html",
code => 200,
headers => {
Cookie => q{sitePrefs=%7B%22lang%22%3A%22ja-JP%22%7D}
},
legacy => 1,
},
];
run_tests( $tests,
{
debug => 0,
type => 'condition',
});
t/42.expression.t view on Meta::CPAN
my $size_formatted = $inc_size < 1024 ? $inc_size : $inc_size->format_bytes;
my $tests =
[
{
expect => qr/^[[:blank:]\h\v]*Regular expression matched\!/,
name => 'regex',
uri => "${BASE_URI}/10.01.expr.html",
code => 200,
headers => {
Cookie => q{sitePrefs=%7B%22lang%22%3A%22en-GB%22%7D}
},
},
{
expect => qr/^[[:blank:]\h\v]*It worked, no content language found\./,
name => 'Negative length variable',
uri => "${BASE_URI}/10.02.expr.html",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*Ok,[[:blank:]]+found[[:blank:]]+request[[:blank:]]+method\b/,
t/functions.pl view on Meta::CPAN
else
{
$ENV{REQUEST_URI} = $def->{uri};
$ENV{REQUEST_METHOD} = 'GET';
$ENV{HTTPS} = 'off';
$ENV{DOCUMENT_ROOT} = $DOC_ROOT;
if( exists( $def->{headers} ) && ref( $def->{headers} ) eq 'HASH' && scalar( keys( %{$def->{headers}} ) ) )
{
while( my( $header, $value ) = each( %{$def->{headers}} ) )
{
if( $header eq 'Cookie' )
{
$ENV{HTTP_COOKIE} = $value;
}
elsif( $header eq 'Agent' )
{
$ENV{HTTP_USER_AGENT} = $value;
}
elsif( $header eq 'Host' )
{
$ENV{HTTP_HOST} = $value;
( run in 0.589 second using v1.01-cache-2.11-cpan-e9199f4ba4c )