aboutsummaryrefslogtreecommitdiff
path: root/tests/batchset.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/batchset.at')
-rw-r--r--tests/batchset.at29
1 files changed, 14 insertions, 15 deletions
diff --git a/tests/batchset.at b/tests/batchset.at
index d782191..be07cae 100644
--- a/tests/batchset.at
+++ b/tests/batchset.at
@@ -1,4 +1,4 @@
-# This file is part of vmod-variable
+# This file is part of vmod-variable -*- autotest -*-
# Copyright (C) 2015 Sergey Poznyakoff
#
# Vmod-variable is free software; you can redistribute it and/or modify
@@ -17,20 +17,19 @@
AT_SETUP(batchset)
AT_KEYWORDS(batchset)
-AT_CHECK([
-AT_VCL([variable.batchset("y=i,x=s", "^/(\d+)/(.+)", req.url);
-],
-[set resp.http.X-X = variable.get("x");
- set resp.http.X-Y = variable.get_int("y");],
-[txreq -url /10/test
- rxresp
- expect resp.http.X-X == "test"
- expect resp.http.X-Y == "10"
-])
-AT_VARNISHTEST
-],
-[0],
-[OK
+AT_VARNISHTEST([
+sub vcl_recv {
+ variable.batchset("y=i,x=s", "^/(\d+)/(.+)", req.url);
+}
+sub vcl_deliver {
+ set resp.http.X-X = variable.get("x");
+ set resp.http.X-Y = variable.get_int("y");
+}
+],[
+txreq -url /10/test
+rxresp
+expect resp.http.X-X == "test"
+expect resp.http.X-Y == "10"
])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.