From: Alan T. DeKok Date: Tue, 13 Aug 2024 15:33:05 +0000 (-0400) Subject: add test for (date - date --> uint32) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2305f8a0843308d78ebe8bd7a1475b441fd1a0e2;p=thirdparty%2Ffreeradius-server.git add test for (date - date --> uint32) which should come out as seconds --- diff --git a/src/tests/unit/calc.txt b/src/tests/unit/calc.txt index 4e1514da7c9..742a8457017 100644 --- a/src/tests/unit/calc.txt +++ b/src/tests/unit/calc.txt @@ -107,6 +107,12 @@ match 1970-01-10T00:00:00Z calc date "Jan 11 1970 00:00:00 UTC" - time_delta 1d -> date match 1970-01-10T00:00:00Z +# +# The default output for time delta is seconds. +# +calc date "Jan 11 1970 00:00:00 UTC" - date "Jan 1 1970 00:00:00 UTC" -> uint32 +match 864000 + # # Comparisons don't need output data types # @@ -213,4 +219,4 @@ calc string "2" += string "test" match 2test count -match 98 +match 100