]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tests for %{string:} with other data types
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 Jul 2022 15:11:23 +0000 (11:11 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 8 Jul 2022 19:59:17 +0000 (15:59 -0400)
src/tests/keywords/escape-sequences

index 0c3310b94f2b6fcd918f9fb13ddb2d0f7e42fa4d..3436d9e7cefe5da97c6697f6dfda8f02f8bd7488 100644 (file)
@@ -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