diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtests/blenlib/BLI_path_util_test.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc index 480d48d6080..734bbc2b31e 100644 --- a/tests/gtests/blenlib/BLI_path_util_test.cc +++ b/tests/gtests/blenlib/BLI_path_util_test.cc @@ -408,6 +408,20 @@ TEST(path_util, Frame) EXPECT_FALSE(ret); EXPECT_STREQ("test_middle", path); } + + /* negative frame numbers */ + { + char path[FILE_MAX] = "test_####"; + ret = BLI_path_frame(path, -1, 4); + EXPECT_TRUE(ret); + EXPECT_STREQ("test_-0001", path); + } + { + char path[FILE_MAX] = "test_####"; + ret = BLI_path_frame(path, -100, 4); + EXPECT_TRUE(ret); + EXPECT_STREQ("test_-0100", path); + } } /* BLI_split_dirfile */ |