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
b20a6ee2
Commit
b20a6ee2
authored
Oct 17, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test set.matched() with a negative argument.
parent
f50b0d05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
set.vtc
src/tests/set.vtc
+3
-1
No files found.
src/tests/set.vtc
View file @
b20a6ee2
...
...
@@ -34,7 +34,7 @@ varnish v1 -vcl {
set resp.http.unanchored1 = unanchored.match("foobar");
set resp.http.unanchored1n = unanchored.nmatches();
#
set resp.http.unanchored1--1 = unanchored.matched(-1);
set resp.http.unanchored1--1 = unanchored.matched(-1);
set resp.http.unanchored1-0 = unanchored.matched(0);
set resp.http.unanchored1-1 = unanchored.matched(1);
set resp.http.unanchored1-2 = unanchored.matched(2);
...
...
@@ -104,6 +104,7 @@ client c1 {
expect resp.http.unanchored-1-illegal == "false"
expect resp.http.unanchored1 == "true"
expect resp.http.unanchored1n == "2"
expect resp.http.unanchored1--1 == "false"
expect resp.http.unanchored1-0 == "false"
expect resp.http.unanchored1-1 == "true"
expect resp.http.unanchored1-2 == "true"
...
...
@@ -142,6 +143,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
expect 0 * Begin req
expect * = VCL_Error "^vmod re2 error: unanchored.nmatches.. called without prior match$"
expect * = VCL_Error "^vmod re2 error: unanchored.matched.1. called without prior match$"
expect * = VCL_Error "^vmod re2 error: n=-1 out of range in unanchored.matched.. .2 patterns.$"
expect * = VCL_Error "^vmod re2 error: n=0 out of range in unanchored.matched.. .2 patterns.$"
expect * = VCL_Error "^vmod re2 error: n=3 out of range in unanchored.matched.. .2 patterns.$"
expect * = End
...
...
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