Commit d4ff3a23 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

VCC coverage case



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3247 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5b7b2651
# $Id$
test "Various VCL compiler coverage tests"
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
/* Test string regexp matching and "else if" */
sub vcl_recv {
if ((req.url ~ "foobar")) {
pass;
} else if (req.url ~ "snafu") {
pipe;
} else {
pass;
}
}
}
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
/* test time and backend comparison */
sub vcl_fetch {
if (obj.ttl > 1d) {
set obj.ttl = 1d;
}
if (req.backend == b) {
set obj.ttl = 1d;
} else if (req.backend != b) {
set obj.ttl = 1h;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment