Move utils_expand_path and utils_expand_path_keep_symlink to libpath.la
[lttng-tools.git] / tests / unit / test_utils_expand_path.cpp
index 428acad2285191827a65232ce6bf1bc6e7e94bf7..8216f3fd7b7a35625f55bf865971ccdf21718456 100644 (file)
@@ -16,6 +16,7 @@
 #include <tap/tap.h>
 
 #include <common/utils.h>
+#include <common/path.h>
 #include <common/common.h>
 
 /* For error.h */
@@ -271,7 +272,7 @@ static void test_utils_expand_path(void)
 
                result = utils_expand_path(valid_tests_inputs[i].input);
                ok(result != NULL &&
-                               strcmp(result, valid_tests_expected_results[i]) == 0, name);
+                       strcmp(result, valid_tests_expected_results[i]) == 0, "%s", name);
 
                free(result);
        }
@@ -301,12 +302,12 @@ static void test_utils_expand_path(void)
                        PRINT_ERR("truncation occurred while concatenating paths \"%s\" and \"%s\"",
                                        real_tree_origin,
                                        symlink_tests_inputs[i].input);
-                       fail(name);
+                       fail("%s", name);
                        continue;
                }
                result = utils_expand_path(tmppath);
                ok(result != NULL && strcmp(result + treelen,
-                                       symlink_tests_inputs[i].expected_result) == 0, name);
+                       symlink_tests_inputs[i].expected_result) == 0, "%s", name);
 
                free(result);
        }
@@ -322,7 +323,7 @@ static void test_utils_expand_path(void)
                if (result != NULL) {
                        free(result);
                }
-               ok(result == NULL, name);
+               ok(result == NULL, "%s", name);
        }
 }
 
This page took 0.024437 seconds and 4 git commands to generate.