20 setenv(
"PCMK_schema_directory", PCMK__TEST_SCHEMA_DIR, 1);
26 teardown(
void **state)
29 unsetenv(
"PCMK_schema_directory");
37 unknown_is_lesser(
void **state)
40 "pacemaker-0.2") == 0);
42 "pacemaker-1.0") < 0);
44 "pacemaker-0.1") > 0);
52 "pacemaker-next") < 0);
54 "pacemaker-0.7") > 0);
59 none_is_greater(
void **state)
70 "pacemaker-1.0") > 0);
76 "pacemaker-next") > 0);
82 next_is_before_none(
void **state)
85 "pacemaker-next") == 0);
89 "pacemaker-next") < 0);
91 "pacemaker-1.0") > 0);
95 known_numeric(
void **state)
98 "pacemaker-1.0") == 0);
100 "pacemaker-1.0") > 0);
102 "pacemaker-2.0") < 0);
106 case_insensitive(
void **state)
109 "pacemaker-1.0") == 0);
111 "pacemaker-1.0") > 0);
113 "pacemaker-2.0") < 0);
117 cmocka_unit_test(unknown_is_lesser),
118 cmocka_unit_test(none_is_greater),
119 cmocka_unit_test(next_is_before_none),
120 cmocka_unit_test(known_numeric),
121 cmocka_unit_test(case_insensitive));
int pcmk__cmp_schemas_by_name(const char *schema1_name, const char *schema2_name)
void crm_schema_init(void)
void crm_schema_cleanup(void)
Wrappers for and extensions to libxml2.
PCMK__UNIT_TEST(setup, teardown, cmocka_unit_test(unknown_is_lesser), cmocka_unit_test(none_is_greater), cmocka_unit_test(next_is_before_none), cmocka_unit_test(known_numeric), cmocka_unit_test(case_insensitive))