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
75c80145
Commit
75c80145
authored
Oct 21, 2014
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test the return value more closely
parent
d387f091
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 @
75c80145
varnishtest "Test substring matching in std"
server s1 {
rxreq
txresp
varnishtest "Test std.substr"
server s1 -repeat 2 {
rxreq
txresp
} -start
...
...
@@ -12,23 +9,16 @@ varnish v1 -vcl+backend {
import ${vmod_std};
sub vcl_deliver {
if (std.strstr(req.url, "foo")) {
set resp.http.sub = "found";
} else {
set resp.http.sub = "not found";
}
set resp.http.sub = std.strstr(req.url, "b");
}
} -start
client c1 {
txreq -url "/foobar"
rxresp
expect resp.http.sub == "found"
expect resp.http.sub == "bar"
txreq -url "/quux"
rxresp
expect resp.http.sub == "
not found
"
expect resp.http.sub == ""
} -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