varnishtest "Test disabling inline C code"

server s1 {
	rxreq
	txresp
} -start

varnish v1

varnish v1 -cliok "param.set vcc_feature +allow_inline_c"

varnish v1 -vcl+backend {
	C{ /*...*/ }C
}

varnish v1 -cliok "param.set vcc_feature -allow_inline_c"

varnish v1 -errvcl {Inline-C not allowed} {
	backend default {
		.host = "${s1_sock}";
	}
	C{ /*...*/ }C
}

varnish v1 -errvcl {Inline-C not allowed} {
	backend default {
		.host = "${s1_sock}";
	}
	sub vcl_recv {
		C{ /*...*/ }C
	}
}

varnish v1 -cliok "param.set vcc_feature +allow_inline_c"

varnish v1 -vcl+backend {
	sub vcl_recv {
		C{ /*...*/ }C
	}
}

varnish v1 -vcl+backend {
	C{ /*...*/ }C
}

varnish v1 -start

client c1 {
	txreq
	rxresp
} -run
