vtest "Test disabling inline C code"

server s1 {
	rxreq
	txresp
} -start

vinyl v1

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

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

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

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

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

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

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

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

vinyl v1 -start

client c1 {
	txreq
	rxresp
} -run
