]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove &
authorAlan T. DeKok <aland@freeradius.org>
Wed, 26 Mar 2025 16:01:54 +0000 (12:01 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 26 Mar 2025 17:36:09 +0000 (13:36 -0400)
src/lib/server/tmpl_dcursor_tests.c

index 14725bec42fae34e0a7c75720e32f9164bc80f26..3af9b6f487ce06250c241b13f02beeed69a2299e 100644 (file)
@@ -225,7 +225,7 @@ static void test_level_1_one(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
        test_end;
@@ -240,7 +240,7 @@ static void test_level_1_one_second(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[1]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[1]");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -255,7 +255,7 @@ static void test_level_1_one_all(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[*]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[*]");
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
        test_end;
@@ -270,7 +270,7 @@ static void test_level_1_one_missing(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -285,7 +285,7 @@ static void test_level_1_one_last(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[n]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[n]");
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
        test_end;
@@ -302,7 +302,7 @@ static void test_level_1_two(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
        test_end;
@@ -319,7 +319,7 @@ static void test_level_1_two_second(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[1]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[1]");
        TEST_CHECK_PAIR(test_vp(), int32_vp2);
 
        test_end;
@@ -336,7 +336,7 @@ static void test_level_1_two_third(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[2]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[2]");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -353,7 +353,7 @@ static void test_level_1_two_all(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[*]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[*]");
 
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
@@ -374,7 +374,7 @@ static void test_level_1_two_last(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[n]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[n]");
        TEST_CHECK_PAIR(test_vp(), int32_vp2);
 
        test_end;
@@ -391,7 +391,7 @@ static void test_level_1_two_count(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int32-0[#]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int32-0[#]");
        TEST_CHECK_PAIR(test_vp(), int32_vp1);
 
        test_vp_set(fr_dcursor_next(test_cursor()));
@@ -409,7 +409,7 @@ static void test_level_2_one(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), child_vp1);
 
        test_end;
@@ -424,7 +424,7 @@ static void test_level_2_one_second(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int16-0[1]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int16-0[1]");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -439,7 +439,7 @@ static void test_level_2_one_all(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int16-0[*]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int16-0[*]");
        TEST_CHECK_PAIR(test_vp(), child_vp1);
 
        test_end;
@@ -454,7 +454,7 @@ static void test_level_2_one_missing(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -471,7 +471,7 @@ static void test_level_2_two(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), child_vp1);
 
        test_end;
@@ -488,7 +488,7 @@ static void test_level_2_two_second(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0[1].Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0[1].Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), child_vp2);
 
        test_end;
@@ -505,7 +505,7 @@ static void test_level_2_two_all(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0[*].Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0[*].Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), child_vp1);
 
        test_vp_set(fr_dcursor_next(test_cursor()));
@@ -525,7 +525,7 @@ static void test_level_2_two_last(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0[n].Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0[n].Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), child_vp2);
 
        test_end;
@@ -542,7 +542,7 @@ static void test_level_2_two_missing(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0[*].Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0[*].Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -557,7 +557,7 @@ static void test_level_3_one(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), leaf_string_vp1);
 
        test_end;
@@ -572,7 +572,7 @@ static void test_level_3_one_second(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[0].Child-TLV[1].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[0].Child-TLV[1].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -587,7 +587,7 @@ static void test_level_3_one_all(void)
        pair_defs(1);
 
        pair_populate(1);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[0].Child-TLV[*].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[0].Child-TLV[*].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), leaf_string_vp1);
 
        test_end;
@@ -601,7 +601,7 @@ static void test_level_3_two(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-Int32");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-Int32");
        TEST_CHECK_PAIR(test_vp(), leaf_int32_vp1);
 
        test_end;
@@ -615,7 +615,7 @@ static void test_level_3_two_all(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[*].Child-TLV[*].Leaf-Int32");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[*].Child-TLV[*].Leaf-Int32");
        TEST_CHECK_PAIR(test_vp(), leaf_int32_vp1);
 
        test_vp_set(fr_dcursor_next(test_cursor()));
@@ -632,7 +632,7 @@ static void test_level_3_two_last(void)
 
        pair_populate(1);
        pair_populate(2);
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[n].Child-TLV[n].Leaf-Int32[n]");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[n].Child-TLV[n].Leaf-Int32[n]");
        TEST_CHECK_PAIR(test_vp(), leaf_int32_vp2);
 
        test_end;
@@ -645,11 +645,11 @@ static void test_level_1_build(void)
        fr_pair_t       *inserted;
 
        pair_populate(1);
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Int16-0");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Int16-0");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -662,11 +662,11 @@ static void test_level_2_build_leaf(void)
        fr_pair_t       *inserted;
 
        pair_populate(1);
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Group-0.Test-Int32-0");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Group-0.Test-Int32-0");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -677,11 +677,11 @@ static void test_level_2_build_intermediate(void)
        common_vars;
        fr_pair_t       *inserted;
 
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Group-0.Test-Int16-0");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Group-0.Test-Int16-0");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Int16-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Int16-0");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -696,7 +696,7 @@ static void test_level_2_build_multi(void)
 
        pair_populate_thin(1);
        pair_populate_thin(2);
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Group-0[*].Test-Int32-0");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Group-0[*].Test-Int32-0");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
 
        second = fr_dcursor_next(test_cursor());
@@ -704,7 +704,7 @@ static void test_level_2_build_multi(void)
        TEST_CHECK_PAIR_NEQ(second, inserted);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0[*].Test-Int32-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0[*].Test-Int32-0");
        TEST_CHECK_PAIR(test_vp(), inserted);
        test_vp_set(fr_dcursor_next(test_cursor()));
        TEST_CHECK_PAIR(test_vp(), second);
@@ -719,11 +719,11 @@ static void test_level_3_build_leaf(void)
        fr_pair_t       *inserted;
 
        pair_populate(1);
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Group-0.Test-Group-0.Test-String-0");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Group-0.Test-Group-0.Test-String-0");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Group-0.Test-Group-0.Test-String-0");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Group-0.Test-Group-0.Test-String-0");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -734,11 +734,11 @@ static void test_level_3_build_entire(void)
        common_vars;
        fr_pair_t       *inserted;
 
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[0].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -753,12 +753,12 @@ static void test_level_3_build_partial(void)
 
        pair_populate(1);
        pair_populate_thin(2);
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR_NEQ(inserted, NULL);
        TEST_CHECK_PAIR_NEQ(inserted, leaf_string_vp1);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[1].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), inserted);
 
        test_end;
@@ -769,11 +769,11 @@ static void test_level_3_build_invalid1(void)
        common_vars;
        fr_pair_t       *inserted;
 
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[3].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;
@@ -784,11 +784,11 @@ static void test_level_3_build_invalid2(void)
        common_vars;
        fr_pair_t       *inserted;
 
-       tmpl_setup_and_cursor_build_init(&inserted, "&Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_build_init(&inserted, "Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(inserted, NULL);
        build_test_end;
 
-       tmpl_setup_and_cursor_init(test_vp_p(), "&Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");
+       tmpl_setup_and_cursor_init(test_vp_p(), "Test-Nested-Top-TLV-0[*].Child-TLV[0].Leaf-String");
        TEST_CHECK_PAIR(test_vp(), NULL);
 
        test_end;