Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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-re2
Commits
5b126dae
Commit
5b126dae
authored
Mar 16, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests for the perl_classes and word_boundary options
parent
9bce45cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
compile_fail.vtc
src/tests/compile_fail.vtc
+41
-0
No files found.
src/tests/compile_fail.vtc
View file @
5b126dae
...
...
@@ -232,3 +232,44 @@ varnish v1 -errvcl {vmod re2 error: Cannot compile '(a{1}*)' in bad constructor:
new bad = re2.regex("(a{1}*)");
}
}
# Now verify the combination of posix_syntax with perl_classes and
# word_boundary
varnish v1 -errvcl {vmod re2 error: Cannot compile '\d \s \w \D \S \W' in bad constructor: invalid escape sequence: \d} {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new bad = re2.regex("\d \s \w \D \S \W", posix_syntax=true);
}
}
varnish v1 -vcl {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new good = re2.regex("\d \s \w \D \S \W", posix_syntax=true,
perl_classes=true);
}
}
varnish v1 -errvcl {vmod re2 error: Cannot compile '\b \B' in bad constructor: invalid escape sequence: \b} {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new bad = re2.regex("\b \B", posix_syntax=true);
}
}
varnish v1 -vcl {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new good = re2.regex("\b \B", posix_syntax=true,
word_boundary=true);
}
}
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