aboutsummaryrefslogtreecommitdiff
path: root/tests/undef.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/undef.at')
-rw-r--r--tests/undef.at32
1 files changed, 15 insertions, 17 deletions
diff --git a/tests/undef.at b/tests/undef.at
index fa0aaf8..65165d1 100644
--- a/tests/undef.at
+++ b/tests/undef.at
@@ -14,28 +14,26 @@
# You should have received a copy of the GNU General Public License
# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP(undef)
AT_KEYWORDS(undef)
-AT_CHECK([
-AT_VCL([variable.set("s", "test");
-variable.set("t", "foo");
-variable.undef("s");
-],
-[
- set resp.http.X-S = variable.defined("s");
- set resp.http.X-T = variable.defined("t");],
-[txreq -url /
- rxresp
- expect resp.http.X-S == "0"
- expect resp.http.X-T == "1"
-])
-AT_VARNISHTEST
-],
-[0],
-[OK
+AT_VARNISHTEST([
+sub vcl_recv {
+ variable.set("s", "test");
+ variable.set("t", "foo");
+ variable.undef("s");
+}
+sub vcl_deliver {
+ set resp.http.X-S = variable.defined("s");
+ set resp.http.X-T = variable.defined("t");
+}
+],[
+txreq -url /
+rxresp
+expect resp.http.X-S == "0"
+expect resp.http.X-T == "1"
])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.