chiark / gitweb /
importd: add new bus calls for importing local tar and raw images
[elogind.git] / src / test / test-path-util.c
index 4ebbfa9a768b3cc9400ebdd02af8d693cb7ab91e..11aa52aaed51b7e5d307c5fc7a8bcf5ffc2a03bf 100644 (file)
@@ -109,6 +109,8 @@ static void test_find_binary(const char *self, bool local) {
 
         assert_se(find_binary("/some/dir/xxxx-xxxx", local, &p) ==
                   (local ? -ENOENT : 0));
+        if (!local)
+                free(p);
 }
 
 static void test_prefixes(void) {
@@ -174,13 +176,13 @@ static void test_path_join(void) {
         test_join("/root", "/a/b", "/c", "/root/a/b/c");
         test_join("/root", "a/b", "c", "/root/a/b/c");
         test_join("/root", "/a/b", "c", "/root/a/b/c");
-        test_join("/root", "/", "c", "/root//c");
+        test_join("/root", "/", "c", "/root/c");
         test_join("/root", "/", NULL, "/root/");
 
         test_join(NULL, "/a/b", "/c", "/a/b/c");
         test_join(NULL, "a/b", "c", "a/b/c");
         test_join(NULL, "/a/b", "c", "/a/b/c");
-        test_join(NULL, "/", "c", "//c");
+        test_join(NULL, "/", "c", "/c");
         test_join(NULL, "/", NULL, "/");
 }