17 empty_input(
void **state)
28 leading_newline(
void **state)
30 char *s = strdup(
"\nabcd");
37 middle_newline(
void **state)
39 char *s = strdup(
"ab\ncd");
46 trailing_newline(
void **state)
48 char *s = strdup(
"abcd\n\n");
53 s = strdup(
"abcd\n ");
59 other_whitespace(
void **state)
61 char *s = strdup(
" ab\t\ncd \t");
63 assert_string_equal(
pcmk__trim(s),
" ab\t\ncd \t");
68 cmocka_unit_test(empty_input),
69 cmocka_unit_test(leading_newline),
70 cmocka_unit_test(middle_newline),
71 cmocka_unit_test(trailing_newline),
72 cmocka_unit_test(other_whitespace))
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__trim(char *str)