]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more tests and notes on what we want to do
authorAlan T. DeKok <aland@freeradius.org>
Tue, 28 May 2024 12:23:52 +0000 (08:23 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 3 Jun 2024 12:43:48 +0000 (08:43 -0400)
src/tests/keywords/edit-multivalue

index 0c5a626526d9850c1459b176b63ae55138956aae..ca947561087e6c34e58234b6f8759cd39fb63598 100644 (file)
@@ -31,6 +31,9 @@ if !(&foo[#] == 1) {
 
 &Reply-Message += { "a", "b", "c" }
 
+#
+#  This seems wrong and inconsistent with Filter-Id below???
+#
 if !(&Reply-Message == "fooabc") {
        test_fail
 }
@@ -49,4 +52,27 @@ if !(&foo == "abc") {
        test_fail
 }
 
+&request -= &Reply-Message
+
+#
+#  Attribute references in in-place lists work.
+#
+&Reply-Message := { &Filter-ID[2], &Filter-ID[1], &Filter-ID[0] }
+if !(&Reply-Message[#] == 3) {
+       test_fail
+}
+
+if (&Reply-Message[0] != 'c') {
+       test_fail
+}
+
+#
+#  This would make sense, but it doesn't work.  Instead it says:
+#
+#   Missing attribute value
+#   Failed creating map from '&Reply-Message = (null)'
+#
+#&Tmp-Group-0 := { &Reply-Message, &Filter-Id }
+
+
 success