varnishtest "Test std.getenv"

varnish v1 -vcl {
	import std;

	backend dummy { .host = "${bad_backend}"; }

	sub vcl_recv {
		return(synth(200));
	}

	sub vcl_synth {
		set resp.http.X-PATH = std.getenv("PATH");
		set resp.http.X-unset = std.getenv(req.http.unset);
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.http.X-PATH ~ "^/"
	expect resp.http.X-unset == ""
} -run
