]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add test for condition / edit of %func(args)
authorAlan T. DeKok <aland@freeradius.org>
Wed, 27 Sep 2023 23:42:47 +0000 (19:42 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 Sep 2023 23:42:47 +0000 (19:42 -0400)
src/tests/keywords/if-function [new file with mode: 0644]

diff --git a/src/tests/keywords/if-function b/src/tests/keywords/if-function
new file mode 100644 (file)
index 0000000..78bdebf
--- /dev/null
@@ -0,0 +1,17 @@
+#
+#  PRE: if
+#
+if !(%md5('foo') == 0xacbd18db4cc2f85cedef654fccc4a4d8) {
+       test_fail
+}
+
+group {
+       octets hash
+
+       &hash = %md5('foo')
+       if !(&hash == 0xacbd18db4cc2f85cedef654fccc4a4d8) {
+               test_fail
+       }
+}
+
+success