blender/tests/gtests
Sybren A. Stüvel 0333cf00ba Fix BLI_path_frame_strip
The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `file.0001.abc` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`file.001.abc` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.

The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path="filename.abc"` would result
in `path="filename.abc"` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.

Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.

I've also added a unit test for the `BLI_path_frame_strip` function.
2019-03-20 13:42:45 +01:00
..
alembic Cleanup: remove contributors for CMake files 2019-02-05 09:10:32 +11:00
blenlib Fix BLI_path_frame_strip 2019-03-20 13:42:45 +01:00
bmesh Cleanup: remove contributors for CMake files 2019-02-05 09:10:32 +11:00
guardedalloc Cleanup: remove contributors for CMake files 2019-02-05 09:10:32 +11:00
testing Cleanup: remove contributors for CMake files 2019-02-05 09:10:32 +11:00
CMakeLists.txt Cleanup: use prefix for tests 2018-02-14 16:02:21 +11:00