varnishtest "varnishhist coverage"

server s1 {
	rxreq
	txresp
} -start

varnish v1 -vcl+backend {} -start

shell -match "Usage: .*varnishhist <options>" \
	"varnishhist -h"
shell -expect "Copyright (c) 2006 Verdens Gang AS" \
	"varnishhist -V"
shell -err -match "Usage: .*varnishhist <options>" \
	"varnishhist -K"
shell -err -match "Usage: .*varnishhist <options>" \
	"varnishhist extra"
shell -err -expect "-p: invalid '0'" \
	"varnishhist -p 0"
shell -err -expect "-B: being able to bend time does not mean we can stop it" \
	"varnishhist -p 2.0 -B 0"
shell -err -expect "-B: being able to bend time does not mean we can make it go backwards" \
	"varnishhist -B -1"
shell -err -expect "Invalid grouping mode: raw" \
	"varnishhist -g raw"
shell -err -expect "-P: No such profile 'foo'" \
	"varnishhist -P foo"
shell -err -expect "-P: 'Timestamp:' is not a valid profile name or definition" \
	"varnishhist -P Timestamp::"
shell -err -expect "-P: 'b:' is not a valid profile name or definition" \
	"varnishhist -P b:"
shell -err -expect "-P: 'foo:' is not a valid tag name" \
	"varnishhist -P foo:"
shell -err -expect "-P: 'b:Debug:' is an unsafe or binary record" \
	"varnishhist -P b:Debug:"
shell -err -expect "-P: 'b:BereqAcct:x' is not a valid profile name or definition" \
	"varnishhist -P b:BereqAcct:x"
shell -err -expect "-P: 'b:BereqAcct:x' is not a valid profile name or definition" \
	"varnishhist -P b:BereqAcct:x:"
shell -err -expect "-P: 'b:BereqAcct:' is not a valid profile name or definition" \
	"varnishhist -P b:BereqAcct::5:1:a"
shell -err -expect "-p: invalid '0'" \
	"varnishhist -P b:BereqAcct::5 -p 0"
