Commit 3cd72fc6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Test both as string and real argument

parent 416c8d45
......@@ -19,8 +19,11 @@ varnish v1 -vcl+backend {
set resp.http.x-qux = std.real2integer(
std.real(req.http.foo, 2.0), 2);
set resp.http.x-xyzzy = std.integer(
std.real(req.http.foo, 2.0), 2);
set resp.http.x-xyzzy1 = std.integer(
s=std.real(req.http.foo, 2.0));
set resp.http.x-xyzzy2 = std.integer(
real=std.real(req.http.foo, 2.0));
set resp.http.x-int-fallback = std.real2integer(123456789012.345 * 1000.0 * 10, 2);
}
......@@ -32,7 +35,8 @@ client c1 {
expect resp.http.x-foo == resp.http.x-bar
expect resp.http.x-baz == 1140618699.000
expect resp.http.x-qux == 1140618699
expect resp.http.x-xyzzy == resp.http.x-qux
expect resp.http.x-xyzzy1 == resp.http.x-qux
expect resp.http.x-xyzzy2 == resp.http.x-qux
expect resp.http.x-int-fallback == 2
} -run
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment