"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/unit/expand_test.c" between
cfengine-3.12.5.tar.gz and cfengine-3.12.6.tar.gz

About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version. LTS (Long Term Support) release.

expand_test.c  (cfengine-3.12.5):expand_test.c  (cfengine-3.12.6)
skipping to change at line 65 skipping to change at line 65
test_extract_reference_("", false, "", ""); test_extract_reference_("", false, "", "");
test_extract_reference_("abc $xa ", false, "", ""); test_extract_reference_("abc $xa ", false, "", "");
test_extract_reference_("${}", false, "", ""); test_extract_reference_("${}", false, "", "");
test_extract_reference_("x$()a", false, "", ""); test_extract_reference_("x$()a", false, "", "");
test_extract_reference_("$($(x))", true, "$($(x))", "$(x)"); test_extract_reference_("$($(x))", true, "$($(x))", "$(x)");
test_extract_reference_("$(x${$(y)})", true, "$(x${$(y)})", "x${$(y)}"); test_extract_reference_("$(x${$(y)})", true, "$(x${$(y)})", "x${$(y)}");
test_extract_reference_("$(x${$(y)}) $(y) ${x${z}}", true, "$(x${$(y)})", "x ${$(y)}"); test_extract_reference_("$(x${$(y)}) $(y) ${x${z}}", true, "$(x${$(y)})", "x ${$(y)}");
} }
static void test_isnakedvar()
{
assert_true(IsNakedVar("$(whatever)", '$'));
assert_true(IsNakedVar("${whatever}", '$'));
assert_true(IsNakedVar("$(blah$(blue))", '$'));
assert_false(IsNakedVar("$(blah)blue", '$'));
assert_false(IsNakedVar("blah$(blue)", '$'));
assert_false(IsNakedVar("$(blah)$(blue)", '$'));
assert_false(IsNakedVar("$(blah}", '$'));
}
#if 0 #if 0
static void test_map_iterators_from_rval_empty(void **state) static void test_map_iterators_from_rval_empty(void **state)
{ {
EvalContext *ctx = *state; EvalContext *ctx = *state;
Policy *p = PolicyNew(); Policy *p = PolicyNew();
Bundle *bp = PolicyAppendBundle(p, "default", "none", "agent", NULL, NULL); Bundle *bp = PolicyAppendBundle(p, "default", "none", "agent", NULL, NULL);
Rlist *lists = NULL; Rlist *lists = NULL;
Rlist *scalars = NULL; Rlist *scalars = NULL;
skipping to change at line 563 skipping to change at line 575
EvalContextDestroy(ctx); EvalContextDestroy(ctx);
} }
int main() int main()
{ {
PRINT_TEST_BANNER(); PRINT_TEST_BANNER();
const UnitTest tests[] = const UnitTest tests[] =
{ {
unit_test(test_extract_scalar_prefix), unit_test(test_extract_scalar_prefix),
unit_test(test_extract_reference), unit_test(test_extract_reference),
unit_test(test_isnakedvar),
#if 0 #if 0
unit_test_setup_teardown(test_map_iterators_from_rval_empty, test_setup, test_teardown), unit_test_setup_teardown(test_map_iterators_from_rval_empty, test_setup, test_teardown),
unit_test_setup_teardown(test_map_iterators_from_rval_literal, test_setu p, test_teardown), unit_test_setup_teardown(test_map_iterators_from_rval_literal, test_setu p, test_teardown),
unit_test_setup_teardown(test_map_iterators_from_rval_naked_list_var, te st_setup, test_teardown), unit_test_setup_teardown(test_map_iterators_from_rval_naked_list_var, te st_setup, test_teardown),
unit_test_setup_teardown(test_map_iterators_from_rval_naked_list_var_nam espace, test_setup, test_teardown), unit_test_setup_teardown(test_map_iterators_from_rval_naked_list_var_nam espace, test_setup, test_teardown),
#endif #endif
unit_test_setup_teardown(test_expand_scalar_two_scalars_concat, test_set up, test_teardown), unit_test_setup_teardown(test_expand_scalar_two_scalars_concat, test_set up, test_teardown),
unit_test_setup_teardown(test_expand_scalar_two_scalars_nested, test_set up, test_teardown), unit_test_setup_teardown(test_expand_scalar_two_scalars_nested, test_set up, test_teardown),
unit_test_setup_teardown(test_expand_scalar_array_concat, test_setup, te st_teardown), unit_test_setup_teardown(test_expand_scalar_array_concat, test_setup, te st_teardown),
unit_test_setup_teardown(test_expand_scalar_array_with_scalar_arg, test_ setup, test_teardown), unit_test_setup_teardown(test_expand_scalar_array_with_scalar_arg, test_ setup, test_teardown),
 End of changes. 2 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)