From: Alan T. DeKok Date: Wed, 14 May 2025 11:14:59 +0000 (-0400) Subject: add test where LHS fails expansion, but the RHS exists X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7321ab5aea18e514e98d7446545a6ef68af79df;p=thirdparty%2Ffreeradius-server.git add test where LHS fails expansion, but the RHS exists --- diff --git a/src/tests/keywords/logical-or b/src/tests/keywords/logical-or index ca9cea1db08..e209aa2fc59 100644 --- a/src/tests/keywords/logical-or +++ b/src/tests/keywords/logical-or @@ -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 }