21 empty_input_list(
void **state) {
29 empty_string(
void **state) {
32 list = g_list_prepend(list, (gpointer)
"xxx");
43 star_matches(
void **state) {
46 list = g_list_prepend(list, (gpointer)
"*");
47 list = g_list_append(list, (gpointer)
"more");
58 star_doesnt_match(
void **state) {
61 list = g_list_prepend(list, (gpointer)
"*");
73 in_list(
void **state) {
76 list = g_list_prepend(list, (gpointer)
"xxx");
77 list = g_list_prepend(list, (gpointer)
"yyy");
78 list = g_list_prepend(list, (gpointer)
"zzz");
91 not_in_list(
void **state) {
94 list = g_list_prepend(list, (gpointer)
"xxx");
95 list = g_list_prepend(list, (gpointer)
"yyy");
105 int main(
int argc,
char **argv)
107 const struct CMUnitTest tests[] = {
108 cmocka_unit_test(empty_input_list),
109 cmocka_unit_test(empty_string),
110 cmocka_unit_test(star_matches),
111 cmocka_unit_test(star_doesnt_match),
112 cmocka_unit_test(in_list),
113 cmocka_unit_test(not_in_list),
116 cmocka_set_message_output(CM_OUTPUT_TAP);
117 return cmocka_run_group_tests(tests, NULL, NULL);
gboolean pcmk__str_in_list(const gchar *s, GList *lst, uint32_t flags)
int main(int argc, char **argv)