Apache2-SSI
view release on metacpan or search on metacpan
# uri => "${BASE_URI}/03.07.if.html",
# code => 200,
# },
{
expect => qr/^[[:blank:]\h\v]*Oh good, nothing found/,
name => 'variable non-zero length with -n',
uri => "${BASE_URI}/03.08.if.html",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*Ok, found the query string/,
name => 'variable non-zero length with !-z',
uri => "${BASE_URI}/03.09.if.html?q=hello&l=ja-JP",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*Remote ip is part of my private network/,
name => 'remote ip against ip block',
uri => "${BASE_URI}/03.10.if.html",
code => 200,
remote_ip => '192.168.2.20',
},
{
expect => qr/^[[:blank:]\h\v]*Ok, remote ip is not part of my subnet/,
name => 'explicit ip against ip block',
uri => "${BASE_URI}/03.11.if.html",
code => 200,
remote_ip => '192.168.2.20',
},
{
expect => qr/^[[:blank:]\h\v]*Ok, remote ip is not part of my subnet/,
name => 'explicit ip against ip block (negative)',
uri => "${BASE_URI}/03.12.if.html",
code => 200,
remote_ip => '192.168.2.20',
},
{
expect => qr/^[[:blank:]\h\v]*Good, query string has a positive value\./,
name => 'positive value of variable',
uri => "${BASE_URI}/03.13.if.html?q=hello&l=ja-JP",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*Good, that variable is empty\./,
name => 'positive value of non-existing variable',
uri => "${BASE_URI}/03.14.if.html",
code => 200,
},
{
expect => qr/^[[:blank:]\h\v]*Good, checked it was off\./,
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',
});
( run in 0.489 second using v1.01-cache-2.11-cpan-d8267643d1d )