From: Alan T. DeKok Date: Fri, 8 Jul 2022 15:11:23 +0000 (-0400) Subject: tests for %{string:} with other data types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6376d22557299386f8cf0332932367b7ca5a287;p=thirdparty%2Ffreeradius-server.git tests for %{string:} with other data types --- diff --git a/src/tests/keywords/escape-sequences b/src/tests/keywords/escape-sequences index 0c3310b94f2..3436d9e7cef 100644 --- a/src/tests/keywords/escape-sequences +++ b/src/tests/keywords/escape-sequences @@ -14,6 +14,8 @@ update request { &Tmp-String-2 := 'i have scary embedded things\000 inside me' &Tmp-String-2 += "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°" + + &Tmp-IP-Address-0 := 127.0.0.1 } @@ -77,4 +79,16 @@ if (&Tmp-String-2[1] != "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°") { test_fail } +# +# Other data types +# +update request { + &Tmp-String-0 := "%{string:&Tmp-IP-Address-0}" +} + +if ("%(length:%{Tmp-String-0})" != 17) { + test_fail +} + + success