Tests: add tests for leading (relative) slashes for BLI_path_join

Also note that leading slashes are kept in the doc-string.
This commit is contained in:
2022-09-12 10:39:24 +10:00
parent caf6225a3d
commit cf9c0a4b50
3 changed files with 18 additions and 3 deletions

View File

@@ -298,6 +298,13 @@ TEST(path_util, JoinComplex)
JOIN("1/2/3/", 100, "1", "////////", "", "2", "3\\");
}
TEST(path_util, JoinRelativePrefix)
{
JOIN("//a/b/c", 100, "//a", "b", "c");
JOIN("//a/b/c", 100, "//", "//a//", "//b//", "//c");
JOIN("//a/b/c", 100, "//", "//", "a", "//", "b", "//", "c");
}
#undef JOIN
/* BLI_path_frame */