--- /dev/null
+# $Id: c00006.vtc 2906 2008-07-08 10:29:07Z phk $
+
+test "Test banning a url with cli:purge"
+
+server s1 {
+ rxreq
+ expect req.url == "/foo"
+ txresp -body "1111\n"
+ rxreq
+ expect req.url == "/foo"
+ txresp -body "11111\n"
+} -start
+
+varnish v1 -vcl+backend { } -start
+
+client c1 {
+ txreq -url "/foo"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.content-length == 5
+}
+
+client c1 -run
+
+varnish v1 -clierr 104 "purge"
+varnish v1 -clierr 104 "purge foo"
+varnish v1 -clierr 104 "purge foo bar"
+varnish v1 -clierr 106 "purge a b c && a"
+varnish v1 -clierr 106 "purge a b c && a b"
+varnish v1 -clierr 106 "purge a b c || a b c"
+varnish v1 -cli "purge req.url ~ foo"
+# varnish v1 -cli "purge req.url ~ foo && req.url ~ bar"
+
+client c1 {
+ txreq -url "/foo"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.content-length == 6
+}
+
+client c1 -run