[master] 3cd72fc67 Test both as string and real argument

Poul-Henning Kamp phk at FreeBSD.org
Mon May 31 17:13:05 UTC 2021


commit 3cd72fc678f81474c237710fbaf096cf0fe640e1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon May 31 14:44:30 2021 +0000

    Test both as string and real argument

diff --git a/bin/varnishtest/tests/m00016.vtc b/bin/varnishtest/tests/m00016.vtc
index 04b58f236..47ee311fe 100644
--- a/bin/varnishtest/tests/m00016.vtc
+++ b/bin/varnishtest/tests/m00016.vtc
@@ -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
 


More information about the varnish-commit mailing list