vtest "Test cookie.isset()"

vinyl v1 -vcl {
	import cookie;
	backend be none;
	sub vcl_recv { return (synth(200)); }
	sub vcl_synth {
		cookie.set("cookie1", "cookie1value");
		set resp.http.does = cookie.isset("cookie1");
		set resp.http.does-not = cookie.isset("nonexistent");
		set resp.http.null = cookie.isset("");
		set resp.http.null2 = cookie.isset(req.http.probably-null);
	}
} -start

client c1 {
	txreq -url "/"
	rxresp
	expect resp.http.does == "true"
	expect resp.http.does-not == "false"
	expect resp.http.null == "false"
	expect resp.http.null2 == "false"
} -run
