Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-12 03:39:24 +0300
committerCampbell Barton <campbell@blender.org>2022-09-12 04:02:25 +0300
commitcf9c0a4b506e85a4158ec68413c60e8af1de4a0a (patch)
tree1557ceba108b5ef7bba237d25a3eb7cfc23781a4 /source/blender/blenlib/tests
parentcaf6225a3d01b3a5d471dc62bb4508477fc4e7df (diff)
Tests: add tests for leading (relative) slashes for BLI_path_join
Also note that leading slashes are kept in the doc-string.
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r--source/blender/blenlib/tests/BLI_path_util_test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc
index 4f6f4a5c413..54afc3d975d 100644
--- a/source/blender/blenlib/tests/BLI_path_util_test.cc
+++ b/source/blender/blenlib/tests/BLI_path_util_test.cc
@@ -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 */