From: Alan T. DeKok Date: Tue, 4 Jul 2023 20:13:46 +0000 (-0400) Subject: use -S tmpl_tokenize_all_nested=yes for pairs test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b5ecb1c14df07e0692366096e31df4cd7d0ad95;p=thirdparty%2Ffreeradius-server.git use -S tmpl_tokenize_all_nested=yes for pairs test 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. --- diff --git a/src/tests/keywords/all.mk b/src/tests/keywords/all.mk index 8160ec66aeb..6233db29952 100644 --- a/src/tests/keywords/all.mk +++ b/src/tests/keywords/all.mk @@ -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 diff --git a/src/tests/keywords/pairs b/src/tests/keywords/pairs index 224178b474e..5e9b446361e 100644 --- a/src/tests/keywords/pairs +++ b/src/tests/keywords/pairs @@ -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 }