[master] 2fb770ed1 Improve test coverage for VSL query parsing.
Geoff Simmons
geoff at uplex.de
Sat Feb 23 17:26:06 UTC 2019
commit 2fb770ed1d4704aeac58e9e44e87c76216f661df
Author: Geoff Simmons <geoff at uplex.de>
Date: Sat Feb 23 18:24:55 2019 +0100
Improve test coverage for VSL query parsing.
diff --git a/bin/varnishtest/tests/u00006.vtc b/bin/varnishtest/tests/u00006.vtc
index b263af36c..ad1b9d3f1 100644
--- a/bin/varnishtest/tests/u00006.vtc
+++ b/bin/varnishtest/tests/u00006.vtc
@@ -83,6 +83,22 @@ shell -err -expect "Expected integer got ']'" \
{varnishlog -q "ReqHeader:foo[]"}
shell -err -expect "Expected positive integer" \
{varnishlog -q "ReqHeader:foo[a]"}
+shell -err -expect "Syntax error in tag name" \
+ {varnishlog -q '*x* eq "foo"'}
+shell -err -expect "Expected number got '>'" \
+ {varnishlog -q "RespStatus > >"}
+shell -err -expect "Floating point parse error" \
+ {varnishlog -q "Timestamp:Start[1] > 0.foo"}
+shell -err -expect "Integer parse error" \
+ {varnishlog -q "RespStatus > foo"}
+shell -err -expect "Expected string got '>'" \
+ {varnishlog -q "ReqMethod eq >"}
+shell -err -expect "Expected regular expression got '>'" \
+ {varnishlog -q "ReqMethod ~ >"}
+shell -err -expect "Regular expression error: " \
+ {varnishlog -q 'ReqMethod ~ "("'}
+shell -err -expect "Expected operator got 'ReqMethod'" \
+ {varnishlog -q "RespStatus ReqMethod 200"}
shell -err -expect "-R: Syntax error" \
"varnishlog -R 1foo"
More information about the varnish-commit
mailing list