17 element_nodes(
void **state)
19 const char *new_value_root;
20 const char *new_value_child;
21 const char *new_value_grandchild;
24 xmlNode *test_xml_child =
create_xml_node(test_xml_root,
"test_xml_child");
25 xmlNode *test_xml_grandchild =
create_xml_node(test_xml_child,
"test_xml_grandchild");
27 xmlNode *test_xml_comment =
string2xml(
"<!-- a comment -->");
41 assert_string_equal(new_value_root,
"5");
42 assert_string_equal(new_value_child,
"1");
43 assert_string_equal(new_value_grandchild,
"2");
47 cmocka_unit_test(element_nodes))
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
PCMK__UNIT_TEST(NULL, NULL, cmocka_unit_test(bad_input), cmocka_unit_test(not_found), cmocka_unit_test(find_attrB), cmocka_unit_test(find_attrA_matching))
xmlNode * string2xml(const char *input)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
xmlNode * pcmk_create_xml_text_node(xmlNode *parent, const char *name, const char *content)
xmlNode * create_xml_node(xmlNode *parent, const char *name)
void fix_plus_plus_recursive(xmlNode *target)
Parse integer assignment statements on this node and all its child nodes.