varnishtest "VCL syntax numbers"

varnish v1 -vcl {backend b1 { .host = "127.0.0.1:8080"; }} -start

varnish v1 -syntax 3.9 -errvcl "VCL version 3.9 not supported." {
	backend b1 { .host = "127.0.0.1:8080"; }
}

varnish v1 -syntax 4.0 -errvcl "silly buggers" {
	vcl 4.01;
	backend b1 { .host = "127.0.0.1:8080"; }
}

varnish v1 -syntax 4.0 -errvcl "VCL version 9.9 not supported" {
	vcl 9.9;
	backend b1 { .host = "127.0.0.1:8080"; }
}

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

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

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

