diff options
Diffstat (limited to 'tests/type_of.at')
-rw-r--r-- | tests/type_of.at | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/type_of.at b/tests/type_of.at index 2aeda17..8d8b7e8 100644 --- a/tests/type_of.at +++ b/tests/type_of.at @@ -17,23 +17,22 @@ AT_SETUP(type_of) AT_KEYWORDS(type_of) -AT_CHECK([ -AT_VCL([variable.set("s", "test"); -variable.set_int("i", 1); -], -[set resp.http.X-S = variable.type_of("s"); - set resp.http.X-I = variable.type_of("i"); - set resp.http.X-Y = variable.type_of("y");], -[txreq -url / - rxresp - expect resp.http.X-S == "STRING" - expect resp.http.X-I == "INT" - expect resp.http.X-Y == "UNSET" -]) -AT_VARNISHTEST -], -[0], -[OK +AT_VARNISHTEST([ +sub vcl_recv { + variable.set("s", "test"); + variable.set_int("i", 1); +} +sub vcl_deliver { + set resp.http.X-S = variable.type_of("s"); + set resp.http.X-I = variable.type_of("i"); + set resp.http.X-Y = variable.type_of("y"); +} +],[ +txreq -url / +rxresp +expect resp.http.X-S == "STRING" +expect resp.http.X-I == "INT" +expect resp.http.X-Y == "UNSET" ]) AT_CLEANUP |