]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add test where LHS fails expansion, but the RHS exists
authorAlan T. DeKok <aland@freeradius.org>
Wed, 14 May 2025 11:14:59 +0000 (07:14 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 14 May 2025 11:18:16 +0000 (07:18 -0400)
src/tests/keywords/logical-or

index ca9cea1db085f0abf8bb638ff2c31e77df6f9965..e209aa2fc59e339c669499a2d1a96d5b77e60cb9 100644 (file)
@@ -18,9 +18,18 @@ if !((test_integer2 == 1) || (test_integer1 == 1)) {
 #
 #  Neither of these exists, so the resulting string should be empty
 #
-Filter-Id := "%{NAS-Port-Id || NAS-Port-Id}"
+Filter-Id := "%{NAS-Port-Id || NAS-Identifier}"
 
-if !(Filter-Id == '') {
+if (Filter-Id != '') {
+       test_fail
+}
+
+#
+#  The first one doesn't exist, but the second one does.
+#
+Filter-Id := "%{NAS-Port-Id || User-Name}"
+
+if (Filter-Id != User-Name) {
        test_fail
 }