[master] be24ee1 More cleanup
Federico G. Schwindt
fgsch at lodoss.net
Mon Sep 26 23:34:04 CEST 2016
commit be24ee1e2f6ca8914a239df7e7739ebbf0a5edef
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sun Sep 25 15:28:00 2016 +0100
More cleanup
diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc
index 7dc818b..2c3c232 100644
--- a/bin/varnishtest/tests/v00016.vtc
+++ b/bin/varnishtest/tests/v00016.vtc
@@ -19,16 +19,6 @@ varnish v1 -errvcl {include not followed by string constant.} {
include <<
}
-varnish v1 -vcl {
- backend b { .host = "127.0.0.1"; }
- sub vcl_recv {
- if (req.url == "foo") {
- } elsif (req.url == "bar") {
- } elseif (req.url == "baz") {
- }
- }
-}
-
varnish v1 -errvcl {include not followed by string constant.} {
/* token test */
error lookup hash pipe pass fetch deliver discard keep restart
@@ -38,41 +28,6 @@ varnish v1 -errvcl {include not followed by string constant.} {
{ } ( ) * + - / % > < = ; ! & . | ~ ,
}
-varnish v1 -vcl {
-
- backend b { .host = "127.0.0.1"; }
-
- /* Test string regexp matching and "else if" */
- sub vcl_recv {
- if ((req.url ~ "foobar")) {
- return(pass);
- } else if (req.url ~ "snafu") {
- return(pipe);
- } else {
- return(pass);
- }
- }
-}
-
-
-varnish v1 -vcl {
-
- backend b { .host = "127.0.0.1"; }
-
- /* test time and backend comparison */
- sub vcl_backend_response {
- if (beresp.ttl > 1d) {
- set beresp.ttl = 1d;
- }
- if (bereq.backend == b) {
- set beresp.ttl = 1d;
- } else if (bereq.backend != b) {
- set beresp.ttl = 1h;
- }
- }
-
-}
-
varnish v1 -errvcl {Unknown time unit 'k'. Legal are 'ms', 's', 'm', 'h', 'd', 'w' and 'y'} {
backend b { .host = "127.0.0.1"; }
sub vcl_backend_response { set beresp.ttl = 1. k; }
@@ -89,11 +44,6 @@ varnish v1 -errvcl {Symbol not found: 'req.hash' (expected type BOOL):} {
sub vcl_hash { if (req.hash != "foo") { } }
}
-varnish v1 -vcl {
- backend b { .host = "127.0.0.1"; }
- sub vcl_hash { if (2 == 3) { } }
-}
-
varnish v1 -errvcl {Symbol not found: 'foo.bar'} {
sub vcl_init {
new bar = foo.bar();
diff --git a/bin/varnishtest/tests/v00020.vtc b/bin/varnishtest/tests/v00020.vtc
index 9c42c55..1fa3891 100644
--- a/bin/varnishtest/tests/v00020.vtc
+++ b/bin/varnishtest/tests/v00020.vtc
@@ -105,10 +105,29 @@ varnish v1 -vcl {
if (req.ttl) { }
if (!req.ttl) { }
+ if (req.ttl > 1d) { }
+ if (req.ttl < 1d) { }
+ if (1) { }
+ if (2 == 3) { }
+ if (2 < 3) { }
+ if (2 > 3) { }
+
+ if (req.backend_hint == b) { }
+ if (req.backend_hint != b) { }
+
+ if (req.url) { }
if (!req.url) { }
+ if (req.url == "foo") { }
+ if (req.url != "foo") { }
+ if (req.url ~ "foo") { }
+ if (req.url !~ "foo") { }
if (1) { }
+ elsif (2) { }
+ elseif (3) { }
+ else if (4) { }
+ else { }
}
}
More information about the varnish-commit
mailing list