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
54295ce5
Commit
54295ce5
authored
Mar 16, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests for the one_line option
parent
5b126dae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
options.vtc
src/tests/options.vtc
+15
-1
No files found.
src/tests/options.vtc
View file @
54295ce5
# looks like -*- vcl -*-
varnishtest "literal, never_nl, dot_nl
and case_sensitiv
e options"
varnishtest "literal, never_nl, dot_nl
, case_sensitive and one_lin
e options"
# Tests from re2 testing/parse_test.cc and testing/re2_test.cc
varnish v1 -vcl {
...
...
@@ -19,6 +19,8 @@ varnish v1 -vcl {
new dot2 = re2.regex("(?-s).", dot_nl=true);
new dot3 = re2.regex(".", dot_nl=true, never_nl=true);
new case = re2.regex("(?i)([wand]{5})", case_sensitive=true);
new not_one = re2.regex("^a$", posix_syntax=true);
new one = re2.regex("^a$", posix_syntax=true, one_line=true);
}
sub vcl_recv {
...
...
@@ -73,6 +75,16 @@ def
set resp.http.case = "match";
set resp.http.case1 = case.backref(1);
}
if (not_one.match({"a
a
a"} )) {
set resp.http.not_one = "match";
}
if (one.match({"a
a
a"} )) {
set resp.http.one = "match";
}
}
} -start
...
...
@@ -93,4 +105,6 @@ client c1 {
expect resp.http.dot3 == <undef>
expect resp.http.case == "match"
expect resp.http.case1 == "Wanda"
expect resp.http.not_one == "match"
expect resp.http.one == <undef>
} -run
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