Commit b9f482b4 authored by Geoff Simmons's avatar Geoff Simmons

test the use of non-capturing parentheses with the sub() method and function

parent eb8c66af
......@@ -29,6 +29,9 @@ varnish v1 -vcl+backend {
} else {
set beresp.status = 999;
}
set beresp.http.sub = barbaz.sub(beresp.http.foo, "\0\1\2");
set beresp.http.subf = re2.sub("(?:bar)(baz)", beresp.http.foo,
"\0\1\2");
}
} -start
......@@ -42,6 +45,8 @@ client c1 {
expect resp.http.foo0f == "barbaz"
expect resp.http.foo1f == "baz"
expect resp.http.foo2f == "fallback"
expect resp.http.sub == "barbazbaz"
expect resp.http.subf == "barbazbaz"
} -run
logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment