]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tests for new functionality
authorAlan T. DeKok <aland@freeradius.org>
Sat, 11 Dec 2021 20:38:19 +0000 (15:38 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 12 Dec 2021 16:33:50 +0000 (11:33 -0500)
src/tests/keywords/edit
src/tests/keywords/edit-list-string [new file with mode: 0644]

index a850139fc3b0d93ac7f89b6fa1e3367f88cfdf36..5c9c44ac8954b0a4a6a0ffdb640dd0927150edc9 100644 (file)
@@ -3,6 +3,7 @@
 #
 update request {
        &Tmp-Integer-0 := 4
+       &Tmp-Integer-1 := 6
 }
 
 #
@@ -14,4 +15,10 @@ if (&Tmp-Integer-0 != 9) {
        test_fail
 }
 
+&Tmp-Integer-0 += &Tmp-Integer-1
+if (&Tmp-Integer-0 != 15) {
+       test_fail
+}
+
+
 success
diff --git a/src/tests/keywords/edit-list-string b/src/tests/keywords/edit-list-string
new file mode 100644 (file)
index 0000000..36c2b40
--- /dev/null
@@ -0,0 +1,17 @@
+#
+#  PRE: edit
+#
+
+#
+#  Lists can be assigned strings, in which case the string MUST be a
+#  list of value-pairs.
+#
+#  The purpose of this functionality is mainly for xlat, exec, etc.
+#
+&control += "Tmp-Integer-0 = 9"
+
+if (&control.Tmp-Integer-0 != 9) {
+       test_fail
+}
+
+success