18 " <!-- This is an A node -->\n" 19 " <nodeA attrA=\"123\" " PCMK_XA_ID "=\"1\">\n" 22 " <!-- This is an A node -->\n" 23 " <nodeA attrA=\"456\" " PCMK_XA_ID "=\"2\">\n" 26 " <!-- This is an A node -->\n" 27 " <nodeA attrB=\"XYZ\" " PCMK_XA_ID "=\"3\">\n" 30 " <!-- This is a B node -->\n" 31 " <nodeB attrA=\"123\" " PCMK_XA_ID "=\"4\">\n" 34 " <!-- This is a B node -->\n" 35 " <nodeB attrB=\"ABC\" " PCMK_XA_ID "=\"5\">\n" 41 bad_input(
void **state) {
51 not_found(
void **state) {
67 find_attrB(
void **state) {
85 find_attrA_matching(
void **state) {
103 cmocka_unit_test(bad_input),
104 cmocka_unit_test(not_found),
105 cmocka_unit_test(find_attrB),
106 cmocka_unit_test(find_attrA_matching));
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
int pcmk__xml_test_setup_group(void **state)
Wrappers for and extensions to libxml2.
void free_xml(xmlNode *child)
xmlNode * pcmk__xml_parse(const char *input)
PCMK__UNIT_TEST(pcmk__xml_test_setup_group, NULL, cmocka_unit_test(bad_input), cmocka_unit_test(not_found), cmocka_unit_test(find_attrB), cmocka_unit_test(find_attrA_matching))
pcmk__action_result_t result