Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-pcre2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-pcre2
Commits
38d53132
Commit
38d53132
authored
Mar 20, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for the alt_circumflex compile option
parent
c07ec357
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
compile_opts.vtc
src/tests/compile_opts.vtc
+32
-2
No files found.
src/tests/compile_opts.vtc
View file @
38d53132
...
@@ -12,8 +12,7 @@ varnishtest "compile options"
...
@@ -12,8 +12,7 @@ varnishtest "compile options"
# extended option is tested in compile.vtc and match.vtc
# extended option is tested in compile.vtc and match.vtc
# XXX
# XXX
# - tests for alt_circumflex, no_auto_capture and ungreedy require
# - tests for no_auto_capture and ungreedy require backrefs
# backrefs
# - tests for alt_verbnames will require retrieving the mark
# - tests for alt_verbnames will require retrieving the mark
# - auto_callout not implemented yet
# - auto_callout not implemented yet
# - test for dupnames will require capturing named refs
# - test for dupnames will require capturing named refs
...
@@ -313,6 +312,37 @@ varnish v1 -errvcl {vmod pcre2 error: Cannot compile '^a\u0041z' in r constructo
...
@@ -313,6 +312,37 @@ varnish v1 -errvcl {vmod pcre2 error: Cannot compile '^a\u0041z' in r constructo
}
}
}
}
# alt_circumflex
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("a.*^", multiline=true, dotall=true);
new r2 = pcre2.regex("a.*^", multiline=true, dotall=true,
alt_circumflex=true);
}
sub vcl_recv {
return(synth(200));
}
sub vcl_synth {
set resp.http.cflex1 = r1.match({"a
"});
set resp.http.cflex2 = r2.match({"a
"});
}
}
client c1 {
txreq
rxresp
expect resp.status == "200"
expect resp.http.cflex1 == "false"
expect resp.http.cflex2 == "true"
} -run
# caseless
# caseless
varnish v1 -vcl {
varnish v1 -vcl {
import pcre2 from "${vmod_topbuild}/src/.libs/libvmod_pcre2.so";
import pcre2 from "${vmod_topbuild}/src/.libs/libvmod_pcre2.so";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment