Commit 9e622f98 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Lasse Karstensen

Test the return value more closely

Conflicts:
	bin/varnishtest/tests/m00018.vtc
parent ed6fda4e
varnishtest "Test substring matching in std"
varnishtest "Test std.substr"
server s1 {
rxreq
txresp
rxreq
txresp
server s1 -repeat 2 {
rxreq
txresp
} -start
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment