vtest "Regression test for ticket 409"

vinyl v1 -errvcl {Unknown token '!' when looking for REGEX} {
	backend be none;
	sub vcl_recv {
		if ( req.url ~ ! "\.(png|jpg|gif|js|css)$" ) {
			return (pass);
		}
	}
}

vinyl v1 -errvcl {Expression has type STRING, expected REGEX} {
	backend be none;
	sub vcl_recv {
		set req.http.regex = "\.(png|jpg|gif|js|css)$";
		if (req.url ~ req.http.regex) {
			return (pass);
		}
	}
}

vinyl v1 -errvcl {Expression has type STRING, expected REGEX} {
	backend be none;
	sub vcl_recv {
		set req.http.regex = "\?.*";
		set req.url = regsub(req.url, req.http.regex, "");
	}
}
