From: phk Date: Sun, 5 Oct 2008 20:37:15 +0000 (+0000) Subject: Coverage test for vcc_acl X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e259ceecb751d0e517a3631d0b6b282a2fa71c48;p=varnish Coverage test for vcc_acl git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3251 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/v00017.vtc b/varnish-cache/bin/varnishtest/tests/v00017.vtc new file mode 100644 index 00000000..4cafb6c9 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/v00017.vtc @@ -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; } } +} +