]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
wrap tests in group { ... } so the tests can declare local variables
authorAlan T. DeKok <aland@freeradius.org>
Fri, 29 Sep 2023 14:26:06 +0000 (10:26 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 29 Sep 2023 14:26:06 +0000 (10:26 -0400)
src/tests/keywords/dhcpv4.conf
src/tests/keywords/dhcpv6.conf
src/tests/keywords/radius.conf

index bd7e67edfcba987dd64f2064240b108d8ae23839..841f4ae1e25ad5ffc30a5fcbae41b401f0d20737 100644 (file)
@@ -44,9 +44,15 @@ server default {
 
        recv Discover {
                #
-               # Include the test file specified by the
-               # KEYWORD environment variable.
+               #  Include the test file specified by the
+               #  KEYWORD environment variable.
                #
-               $INCLUDE ${keyword}/$ENV{KEYWORD}
+               #  Wrap it in a "group" so that the test
+               #  can put local variable definitions at the
+               #  top of the file.
+               #
+               group {
+                       $INCLUDE ${keyword}/$ENV{KEYWORD}
+               }
        }
 }
index 7176367a8af0a7aaed1868f902c8cac4b75bcad8..981bbc20fbc790417ee69b3b8c899f030b1fb5bd 100644 (file)
@@ -44,9 +44,15 @@ server default {
 
        recv Solicit {
                #
-               # Include the test file specified by the
-               # KEYWORD environment variable.
+               #  Include the test file specified by the
+               #  KEYWORD environment variable.
                #
-               $INCLUDE ${keyword}/$ENV{KEYWORD}
+               #  Wrap it in a "group" so that the test
+               #  can put local variable definitions at the
+               #  top of the file.
+               #
+               group {
+                       $INCLUDE ${keyword}/$ENV{KEYWORD}
+               }
        }
 }
index fc9113326ef90bfcea5023d8e05aa33514c42473..245a969665a87ea56145100f46928fae4a33e3fc 100644 (file)
@@ -131,10 +131,16 @@ server default {
                &control.Password.Cleartext := "hello"
 
                #
-               # Include the test file specified by the
-               # KEYWORD environment variable.
+               #  Include the test file specified by the
+               #  KEYWORD environment variable.
                #
-               $INCLUDE ${keyword}/$ENV{KEYWORD}
+               #  Wrap it in a "group" so that the test
+               #  can put local variable definitions at the
+               #  top of the file.
+               #
+               group {
+                       $INCLUDE ${keyword}/$ENV{KEYWORD}
+               }
 
                if (&control.Password.Cleartext) {
                        pap