]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add test of "last loop returns the rcode"
authorAlan T. DeKok <aland@freeradius.org>
Wed, 16 Jul 2025 19:21:42 +0000 (15:21 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 16 Jul 2025 19:21:42 +0000 (15:21 -0400)
src/tests/keywords/foreach-rcode [new file with mode: 0644]

diff --git a/src/tests/keywords/foreach-rcode b/src/tests/keywords/foreach-rcode
new file mode 100644 (file)
index 0000000..a70047b
--- /dev/null
@@ -0,0 +1,17 @@
+NAS-Port := {1, 2, 3, 4 }
+
+noop
+
+foreach thing (NAS-Port) {
+       if (thing == 4) {
+               updated
+       } else {
+               ok
+       }
+}
+
+if (!updated) {
+       test_fail
+}
+
+success