Commit 639de485 authored by Geoff Simmons's avatar Geoff Simmons

bugfix and test the dotall compile option

parent bba87ed2
......@@ -337,3 +337,35 @@ client c1 {
expect resp.http.r2-3 == "false"
expect resp.http.r2-4 == "false"
} -run
# dotall
varnish v1 -vcl {
import pcre2 from "${vmod_topbuild}/src/.libs/libvmod_pcre2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new r1 = pcre2.regex("^12.34", dotall=true);
new r2 = pcre2.regex("^12.34");
new r3 = pcre2.regex("\A.*\Z", dotall=true);
new r4 = pcre2.regex("\A.*\Z");
}
sub vcl_recv {
return(synth(200));
}
# As above
include "${vmod_topbuild}/src/tests/dotall_synth.vcl";
}
client c1 {
txreq
rxresp
expect resp.status == "200"
expect resp.http.r1-1 == "true"
expect resp.http.r1-2 == "true"
expect resp.http.r2-1 == "false"
expect resp.http.r2-2 == "true"
expect resp.http.r3 == "true"
expect resp.http.r4 == "false"
} -run
......@@ -20,7 +20,7 @@ expresion library.
$Object regex(STRING pattern, BOOL allow_empty_class=0, BOOL anchored=0,
ENUM {ANYCRLF, UNICODE} bsr=0, BOOL alt_bsux=0,
BOOL alt_circumflex=0, BOOL alt_verbnames=0, BOOL caseless=0,
BOOL dotall=0, BOOL dollar_endonly=0, BOOL dupnames=0,
BOOL dollar_endonly=0, BOOL dotall=0, BOOL dupnames=0,
BOOL extended=0, BOOL firstline=0, STRING locale=0,
BOOL match_unset_backref=0, INT max_pattern_len=0,
BOOL multiline=0, BOOL never_backslash_c=0, BOOL never_ucp=0,
......
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