]> err.no Git - varnish/commitdiff
Test coverage for vcc_token.c
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 5 Oct 2008 22:45:41 +0000 (22:45 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 5 Oct 2008 22:45:41 +0000 (22:45 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3259 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/v00019.vtc b/varnish-cache/bin/varnishtest/tests/v00019.vtc
new file mode 100644 (file)
index 0000000..75ed656
--- /dev/null
@@ -0,0 +1,57 @@
+# $Id$
+
+test "VCL compiler coverage test: vcc_token.c"
+
+varnish v1 -badvcl " C{ "
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       sub vcl_recv { set req.url = "%/"; }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       sub vcl_recv { set req.url = "%a/"; }
+}
+
+varnish v1 -vcl {
+       backend b { .host = "127.0.0.1"; }
+       sub vcl_recv { set req.url = "%4a"; }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       sub vcl_recv { set req.url = "%0a"; }
+}
+
+varnish v1 -vcl {
+       backend b { .host = "127.0.0.1"; }
+       # comment
+       sub vcl_recv { set req.url = "x"; }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       /*
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       {" }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       "
+}
+
+varnish v1 -vcl {
+       backend b { .host = "127.0.0.1"; }
+       sub vcl_recv { C{ int i; (void)i; }C }
+}
+
+varnish v1 -badvcl {
+       backend b { .host = "127.0.0.1"; }
+       ?
+}
+