--- /dev/null
+# $Id$
+
+test "regexp match and no-match"
+
+server s1 {
+ rxreq
+ txresp -hdr "Foo: bar" -hdr "Bar: foo" -body "1111\n"
+} -start
+
+varnish v1 -vcl+backend {
+
+ sub vcl_fetch {
+ if (obj.http.foo ~ "bar") {
+ set obj.http.foo1 = "1";
+ }
+ if (obj.http.bar !~ "bar") {
+ set obj.http.bar1 = "1";
+ }
+ }
+
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.http.foo1 == "1"
+ expect resp.http.bar1 == "1"
+} -run
switch (tl->t->tok) {
case '~':
+ case T_NOMATCH:
+ Fb(tl, 1, "%sVRT_re_match(",
+ tl->t->tok == '~' ? "" : "!");
vcc_NextToken(tl);
ExpectErr(tl, CSTR);
p = vcc_regexp(tl, 0);
ERRCHK(tl);
vcc_NextToken(tl);
- Fb(tl, 1, "VRT_re_match(%s, %s)\n", vp->rname, p);
+ Fb(tl, 1, "%s, %s)\n", vp->rname, p);
break;
case T_EQ:
case T_NEQ: