From e259ceecb751d0e517a3631d0b6b282a2fa71c48 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 5 Oct 2008 20:37:15 +0000 Subject: [PATCH] Coverage test for vcc_acl git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3251 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/v00017.vtc | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/v00017.vtc 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; } } +} + -- 2.39.5