]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use -S tmpl_tokenize_all_nested=yes for pairs test
authorAlan T. DeKok <aland@freeradius.org>
Tue, 4 Jul 2023 20:13:46 +0000 (16:13 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 4 Jul 2023 20:13:46 +0000 (16:13 -0400)
the test prints pairs to a string.  That format depends on the
value of the -S tmpl_tokenize_all_nested=yes flag.

However, we couldn't use logical or (||) until that issue was
first fixed.

src/tests/keywords/all.mk
src/tests/keywords/pairs

index 8160ec66aeb1ac11dd53480a1ce204d5a178a81e..6233db299529bbd913dcc942237dc0787416459b 100644 (file)
@@ -71,7 +71,7 @@ KEYWORD_UPDATE_TESTS := update-attr-ref-null update-error-3 update-group-error u
 KEYWORD_UPDATE_REWRITE_TESTS := update-all update-array update-delete update-remove-any update-group update-hex update-remove-value update-index update-list-error update-remove-list update-prepend unknown-update  update-error update-error-2 update-exec-error update-list-null-rhs update-exec
 
 # Tests which can use new conditions, but which can't use tmpl_tokenize_all_nested=yes
-KEYWORD_UPDATE_TMPL_TESTS      := foreach-regex pairs xlat-dhcpv4
+KEYWORD_UPDATE_TMPL_TESTS      := foreach-regex xlat-dhcpv4
 
 #
 #  Migration support.  Some of the tests don't run under the new
index 224178b474ef1c1f2bcd67cca3926c8d94b7d0e6..5e9b446361ec1f946656f04570dd07c09af783fc 100644 (file)
@@ -32,7 +32,11 @@ if !(&Tmp-String-3 == 'Tmp-String-0 = "This is a string", Tmp-String-0 = "This i
        test_fail
 }
 
-if !(&Tmp-String-4 == 'Password.Cleartext = "hello"') {
+#
+#  Allow old-style, and with -S tmpl_tokenize_all_nested=yes
+#
+if !((&Tmp-String-4 == 'Password.Cleartext = "hello"') ||
+     (&Tmp-String-4 == 'Password = { Cleartext = "hello" }')) {
        test_fail
 }