Commit 881ebc72 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add more test-coverage for VCL expressions

parent 6a9d2f2f
......@@ -26,7 +26,7 @@ varnish v1 -vcl {
varnish v1 -badvcl {
sub vcl_recv {
if (!req.restarts != req.url) {
set req.http.foo = "foo" + 3;
set req.http.foo = "foo";
}
}
......@@ -79,3 +79,111 @@ varnish v1 -badvcl {
}
}
}
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_recv {
set req.http.foo = "foo" + "bar";
set req.http.foo = "foo" + 1;
set req.http.foo = "foo" + now;
set req.http.foo = now + 1s;
set req.http.foo = now - 1s;
set req.http.foo = now - now;
set req.http.foo = 1 + 1;
set req.http.foo = 1 - 1;
set req.ttl = 1s;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = "foo" - "bar";
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = now + "foo";
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = now + now;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = now + 1;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1 + "foo";
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1 + now;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1 + 1s;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1s;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1s + 1;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1s + now;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = 1s + "foo";
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.http.foo = "foo" + 1s;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.ttl = 1s + 1;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.ttl = 1s + now;
}
}
varnish v1 -badvcl {
sub vcl_recv {
set req.ttl = 1s + "foo";
}
}
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