]> err.no Git - varnish/commitdiff
Coverage test for vcc_acl
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 5 Oct 2008 20:37:15 +0000 (20:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 5 Oct 2008 20:37:15 +0000 (20:37 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3251 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/v00017.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/v00017.vtc b/varnish-cache/bin/varnishtest/tests/v00017.vtc
new file mode 100644 (file)
index 0000000..4cafb6c
--- /dev/null
@@ -0,0 +1,67 @@
+# $Id$
+
+test "VCL compiler coverage test: vcc_acl.c"
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { "10.1.2.3"/33; }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { "1::2"/129; }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -vcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a {
+               "1.2.3.4";
+               "1.2.3.4";
+       }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a {
+               "1.2.3.4";
+               !"1.2.3.4";
+       }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { "en.lille.nisse.rejste"; }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { "10.1.2."; }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { ( "10.1.2"; }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a { "10.1.2" ); }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+
+varnish v1 -vcl {
+       backend b { .host = "127.0.0.1"; }
+       acl a {
+               "10.1.3"; 
+               ("en.lille.nisse.rejste"); 
+       }
+       sub vcl_recv { if (client.ip ~ a) { pass; } }
+}
+