Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
9e622f98
Commit
9e622f98
authored
Oct 21, 2014
by
Federico G. Schwindt
Committed by
Lasse Karstensen
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test the return value more closely
Conflicts: bin/varnishtest/tests/m00018.vtc
parent
ed6fda4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
17 deletions
+7
-17
m00018.vtc
bin/varnishtest/tests/m00018.vtc
+7
-17
No files found.
bin/varnishtest/tests/m00018.vtc
View file @
9e622f98
varnishtest "Test substring matching in std"
varnishtest "Test std.substr"
server s1 {
rxreq
txresp
server s1 -repeat 2 {
rxreq
rxreq
txresp
txresp
} -start
} -start
...
@@ -12,23 +9,16 @@ varnish v1 -vcl+backend {
...
@@ -12,23 +9,16 @@ varnish v1 -vcl+backend {
import ${vmod_std};
import ${vmod_std};
sub vcl_deliver {
sub vcl_deliver {
if (std.strstr(req.url, "foo")) {
set resp.http.sub = std.strstr(req.url, "b");
set resp.http.sub = "found";
} else {
set resp.http.sub = "not found";
}
}
}
} -start
} -start
client c1 {
client c1 {
txreq -url "/foobar"
txreq -url "/foobar"
rxresp
rxresp
expect resp.http.sub == "found"
expect resp.http.sub == "bar"
txreq -url "/quux"
txreq -url "/quux"
rxresp
rxresp
expect resp.http.sub == "
not found
"
expect resp.http.sub == ""
} -run
} -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