21 full_path(
void **state)
26 assert_int_equal(strcmp(
path,
"/dir/file"), 0);
30 assert_int_equal(strcmp(
path,
"/full/path"), 0);
34 assert_int_equal(strcmp(
path,
"/dir/../relative/path"), 0);
39 main(
int argc,
char **argv)
41 const struct CMUnitTest tests[] = {
42 cmocka_unit_test(full_path),
45 cmocka_set_message_output(CM_OUTPUT_TAP);
46 return cmocka_run_group_tests(tests, NULL, NULL);
int main(int argc, char **argv)
char * pcmk__full_path(const char *filename, const char *dirname)
Duplicate a file path, inserting a prefix if not absolute.