From: Nick Porter Date: Wed, 23 Aug 2023 16:26:38 +0000 (+0100) Subject: Correct tests where xlat outputs boolean X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47b4ea42a14afca4ace5bb9cc654385233c26ee1;p=thirdparty%2Ffreeradius-server.git Correct tests where xlat outputs boolean --- diff --git a/src/tests/modules/sql/groups.unlang b/src/tests/modules/sql/groups.unlang index b84feea1026..1b6832dd011 100644 --- a/src/tests/modules/sql/groups.unlang +++ b/src/tests/modules/sql/groups.unlang @@ -54,32 +54,20 @@ else { # # Test paircmp group comparisons # -if (!%{sql.group:groups_group_a}) { - test_pass -} -else { +if (%{sql.group:groups_group_a} != false) { test_fail } -if (%{sql.group:groups_group_b}) { - test_pass -} -else { +if (%{sql.group:groups_group_b} != true) { test_fail } -if (%{sql.group:groups_group_c}) { - test_pass -} -else { +if (%{sql.group:groups_group_c} != true) { test_fail } # Non-existent group -if (!%{sql.group:groups_group_d}) { - test_pass -} -else { +if (%{sql.group:groups_group_d} != false) { test_fail } @@ -88,9 +76,8 @@ else { # &Tmp-String-0 := 'groups_group_b' -if (%{sql.group:%{Tmp-String-0}}) { - test_pass -} -else { +if !(%{sql.group:%{Tmp-String-0}} == yes) { test_fail } + +test_pass