17 empty_input(
void **state) {
26 no_quotes(
void **state) {
27 const char *xpath =
"/some/xpath/lrm[@" XML_ATTR_ID "=xyz]";
32 not_present(
void **state) {
33 const char *xpath =
"/some/xpath/string[@" XML_ATTR_ID "='xyz']";
36 xpath =
"/some/xpath/containing[@" XML_ATTR_ID "='lrm']";
41 present(
void **state) {
43 const char *xpath =
"/some/xpath/containing/lrm[@" XML_ATTR_ID "='xyz']";
46 assert_int_equal(strcmp(s,
"xyz"), 0);
49 xpath =
"/some/other/lrm[@" XML_ATTR_ID "='xyz']/xpath";
51 assert_int_equal(strcmp(s,
"xyz"), 0);
56 cmocka_unit_test(empty_input),
57 cmocka_unit_test(no_quotes),
58 cmocka_unit_test(not_present),
59 cmocka_unit_test(present))
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))
char * pcmk__xpath_node_id(const char *xpath, const char *node)
#define pcmk__assert_asserts(stmt)