vtest "test access to cache_param from vmod"

server s1 {
	rxreq
	txresp

} -start

vinyl v1 -vcl+backend {

	import debug;

	sub vcl_deliver {
		set resp.http.foo = debug.vre_limit();
	}

} -start

vinyl v1 -cliok "param.set pcre2_match_limit 100"

client c1 {
	txreq
	rxresp
	expect resp.http.foo == 100
} -run

vinyl v1 -cliok "param.set pcre2_match_limit 200"

client c1 {
	txreq
	rxresp
	expect resp.http.foo == 200
} -run
