#17 fixed cwk_path_get_relative with relative base

This commit is contained in:
Leonard Iklé committed 2020-11-26 11:41:00 +01:00
1 parent 82eaf2ad3e
commit 795a5d9d18
3 files changed
+25 -1

No files matched your search

+22
View File
@@ -71,6 +71,28 @@ int relative_check()
return EXIT_SUCCESS;
}
int relative_relative_and_absolute()
{
char result[FILENAME_MAX];
size_t length;
cwk_path_set_style(CWK_STYLE_UNIX);
*result = 1;
length = cwk_path_get_relative("./foo", "/bar", result, sizeof(result));
if (length != 0) {
return EXIT_FAILURE;
}
if (*result != '\0') {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
int relative_different_roots()
{
char result[FILENAME_MAX];