]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove old expansions from docs and tests
authorAlan T. DeKok <aland@freeradius.org>
Wed, 4 Oct 2023 12:31:40 +0000 (08:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 4 Oct 2023 12:32:07 +0000 (08:32 -0400)
man/man5/unlang.5
src/tests/keywords/escape-sequences
src/tests/keywords/randstr

index 7e6edaa62b02ddfe18dcfc52ba6523fbc7f44e8c..534f05fccd87f9ff893a448a9b9ff70b892dee92 100644 (file)
@@ -706,20 +706,6 @@ String lengths and arrays
 Similar to a Unix shell, there are ways to reference string lengths,
 and the second or more instance of an attribute in a list.  If you
 need more than this functionality, we suggest using a real language.
-.IP %{strlen:string}
-The number of characters in "string".  If "string" does not exist,
-then the length also does not exist, instead of being zero.
-
-The "string" is expanded before the length is taken.
-
-.IP %(integer:Value)
-The integer value of the Value.
-
-e.g. If a request contains "Service-Type = Login-User", the expansion
-of %(integer:%{Service-Type}) will yield "1".
-
-.IP %{hex:Attribute-Name}
-The hex value of the Attribute-Name, as a series of hex digits.
 
 e.g. If a request contains "Framed-IP-Address = 127.0.0.1", the expansion
 of %{hex:Framed-IP-Address} will yield "0x7f000001".
index 9cad10df664391e502b33da5a370c8f0d3f90406..a856bd8906b226d855435ef65fcafdbb341511a0 100644 (file)
@@ -27,7 +27,7 @@ if (!("%(length:%{Tmp-String-1})" == 42)) {
        test_fail
 }
 
-&Tmp-String-8 := "%{string:%{Tmp-Octets-0}}"
+&Tmp-String-8 := "%{(string) %{Tmp-Octets-0}}"
 if (!(&Tmp-String-8 == "i have scary embedded things\000 inside me")) {
        test_fail
 }
@@ -36,7 +36,7 @@ if (!(&Tmp-String-0 == "i have scary embedded things\000 inside me")) {
        test_fail
 }
 
-&Tmp-String-8 := "%{string:%{Tmp-Octets-1}}"
+&Tmp-String-8 := "%{(string) %{Tmp-Octets-1}}"
 if (!(&Tmp-String-8 == "0x01\0010x07\0070x0A\n0x0D\r\"\"0xb0\260°")) {
        test_fail
 }
@@ -76,10 +76,9 @@ if (!(&Tmp-String-2[1] == "0x01\0010x07\0070x0A\n0x0D\r''0xb0\260°")) {
 #
 #  Other data types
 #
-&Tmp-String-0 := "%{string:&Tmp-IP-Address-0}"
-if (!("%(length:%{Tmp-String-0})" == 17)) {
+&Tmp-String-0 := "%{(string) &Tmp-IP-Address-0}"
+if (!(%(length:%{Tmp-String-0}) == 9)) {
        test_fail
 }
 
-
 success
index 2dcb652ca06c90cf8e6313ee56191030db19862c..34dc40670097750d652bfe69ae73fa26a1d54163 100644 (file)
@@ -9,7 +9,7 @@
 #  This next assignment fails, so it can't go into the above list.  If
 #  it was there, then the entire list assignment would fail.
 #
-&Tmp-String-0 := "%{randstr:%{Tmp-String-0}}"
+&Tmp-String-0 := "%randstr(%{Tmp-String-0})"
 
 #
 #  Empty output on empty input
@@ -21,17 +21,17 @@ if !(&Tmp-String-0 == "") {
 #
 #  Check length of output
 #
-if (!(%{strlen:%{Tmp-String-1}} == 3)) {
+if (!(%length(%{Tmp-String-1}) == 3)) {
        test_fail
 }
 
-if (!(%{strlen:%{Tmp-String-2}} == 24)) {
+if (!(%length(%{Tmp-String-2}) == 24)) {
        test_fail
 }
 #
 #  Check maximum repetition
 #
-if (!(%{strlen:%{Tmp-String-3}} == 1025)) {
+if (!(%length(%{Tmp-String-3}) == 1025)) {
        test_fail
 }
 
@@ -47,7 +47,7 @@ if !(&Tmp-String-4 == "") {
 #
 #  Check repetition of binary output
 #
-if (!(%(length:%{Tmp-String-5}) == 10)) {
+if (!(%length(%{Tmp-String-5}) == 10)) {
        test_fail
 }