vtest "VCL syntax numbers"

vinyl v1 -vcl {backend b1 None;} -start

vinyl v1 -syntax 3.9 -errvcl "VCL version 3.9 not supported." {
	backend b1 None;
}

vinyl v1 -syntax 4.0 -errvcl "silly buggers" {
	vcl 4.01;
	backend b1 None;
}

vinyl v1 -syntax 4.0 -errvcl "VCL version 9.9 not supported" {
	vcl 9.9;
	backend b1 None;
}

vinyl v1 -cliexpect {Don't play silly buggers with VCL version numbers} \
	{vcl.inline t0 "vcl 4.00 ; backend b { .host = \"localhost\";} "}

vinyl v1 -cliexpect {Don't play silly buggers with VCL version numbers} \
	{vcl.inline t1 "vcl 04.0 ; backend b { .host = \"localhost\";} "}

vinyl v1 -cliexpect {Expected 'vcl N.N;' found no semi-colon} \
	{vcl.inline t2 "vcl 4.0  backend b { .host = \"localhost\";} "}
