1
varnishtest "Test VCL regsuball()"
10
varnish v1 -vcl+backend {
12
set beresp.http.baz1 = regsuball(beresp.http.foo, "barb", "zz");
13
set beresp.http.baz2 = regsuball(beresp.http.foo, "ar", "zz");
14
set beresp.http.baz3 = regsuball(beresp.http.foo, "^", "baz");
15
set beresp.http.baz4 = regsuball(beresp.http.foo, "^[;]*", "baz");
16
set beresp.http.baz5 = regsuball(beresp.http.bar, "^b*", "b");
17
set beresp.http.baz6 = regsuball(beresp.http.foo, "^b*", "z");
18
set beresp.http.baz7 = regsuball(beresp.http.foo, "ping", "pong");
25
expect resp.status == 200
26
expect resp.http.baz1 == "zzar"
27
expect resp.http.baz2 == "bzzbzz"
28
expect resp.http.baz3 == "bazbarbar"
29
expect resp.http.baz4 == "bazbarbar"
30
expect resp.http.baz5 == "bar"
31
expect resp.http.baz6 == "zarbar"
32
expect resp.http.baz7 == "barbar"