From cf9c0a4b506e85a4158ec68413c60e8af1de4a0a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Sep 2022 10:39:24 +1000 Subject: Tests: add tests for leading (relative) slashes for BLI_path_join Also note that leading slashes are kept in the doc-string. --- source/blender/blenlib/tests/BLI_path_util_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenlib/tests') 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 */ -- cgit v1.2.3