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:
Diffstat (limited to 'tests/gtests/blenlib/BLI_path_util_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_path_util_test.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc
index c07ff2b0b05..c9a7436df31 100644
--- a/tests/gtests/blenlib/BLI_path_util_test.cc
+++ b/tests/gtests/blenlib/BLI_path_util_test.cc
@@ -618,3 +618,18 @@ TEST(path_util, PathFrameGet)
PATH_FRAME_GET("", -1, -1, false);
}
#undef PATH_FRAME_GET
+
+
+/* BLI_path_extension */
+TEST(path_util, PathExtension)
+{
+ EXPECT_EQ(NULL, BLI_path_extension("some.def/file"));
+ EXPECT_EQ(NULL, BLI_path_extension("Text"));
+ EXPECT_EQ(NULL, BLI_path_extension("Text…001"));
+
+ EXPECT_STREQ(".", BLI_path_extension("some/file."));
+ EXPECT_STREQ(".gz", BLI_path_extension("some/file.tar.gz"));
+ EXPECT_STREQ(".abc", BLI_path_extension("some.def/file.abc"));
+ EXPECT_STREQ(".abc", BLI_path_extension("C:\\some.def\\file.abc"));
+ EXPECT_STREQ(".001", BLI_path_extension("Text.001"));
+}