|
Blender V5.3
|
#include "testing/testing.h"#include "IMB_imbuf.hh"#include "BLI_fileops.hh"#include "BLI_path_utils.hh"#include "BLI_string.hh"#include "BLI_string_utils.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | DO_PERF_TESTS 0 |
Functions | |
Tests for: #BLI_path_cmp_normalized | |
| |
| blender::TEST (path_utils, CompareNormalized) | |
Tests for: #BLI_path_is_unc | |
| blender::TEST (path_utils, IsUnc) | |
Tests for: #BLI_path_is_win32_drive | |
| blender::TEST (path_utils, IsWin32Drive) | |
Tests for: #BLI_path_is_win32_drive_only | |
| blender::TEST (path_utils, IsWin32DriveOnly) | |
Tests for: #BLI_path_is_win32_drive_with_slash | |
| blender::TEST (path_utils, IsWin32DriveWithSlash) | |
Tests for: #BLI_path_frame | |
| blender::TEST (path_utils, Frame) | |
Tests for: #BLI_path_split_dir_file | |
| blender::TEST (path_utils, SplitDirfile) | |
Tests for: #BLI_path_extension | |
| blender::TEST (path_utils, Extension) | |
Tests for: #BLI_path_is_rel | |
| blender::TEST (path_utils, PathIsRel) | |
Tests for: #BLI_path_is_abs_from_cwd | |
| blender::TEST (path_utils, PathIsAbsFromCwd) | |
Tests for: #BLI_path_contains | |
| blender::TEST (path_utils, Contains) | |
Tests for: #BLI_path_relative_to | |
| blender::TEST (path_utils, RelativeTo) | |
| blender::TEST (path_utils, RelativeTo_walk_up) | |
Tests for: #BLI_path_has_hidden_component | |
| blender::TEST (path_utils, HasHiddenComponents) | |
Local Utilities | |
| #define | ABS_PREFIX "" |
| static void | blender::str_replace_char_with_relative_exception (char *str, char src, char dst) |
| static char * | blender::str_replace_char_strdup (const char *str, char src, char dst) |
Tests for: #BLI_path_normalize | |
| #define | NORMALIZE(input, output_expect) |
| blender::TEST (path_utils, Normalize_Nop) | |
| blender::TEST (path_utils, Normalize_NopRelative) | |
| blender::TEST (path_utils, Normalize_Dot) | |
| blender::TEST (path_utils, Normalize_ComplexAbsolute) | |
| blender::TEST (path_utils, Normalize_ComplexRelative) | |
| blender::TEST (path_utils, Normalize_DoubleSlash) | |
| blender::TEST (path_utils, Normalize_Parent) | |
| blender::TEST (path_utils, Normalize_UnbalancedAbsolute) | |
| blender::TEST (path_utils, Normalize_UnbalancedRelative) | |
| blender::TEST (path_utils, Normalize_UnbalancedRelativeTrailing) | |
Tests for: #BLI_path_parent_dir | |
| #define | PARENT_DIR(input, output_expect) |
| blender::TEST (path_utils, ParentDir_Simple) | |
| blender::TEST (path_utils, ParentDir_NOP) | |
| blender::TEST (path_utils, ParentDir_TrailingPeriod) | |
| blender::TEST (path_utils, ParentDir_Complex) | |
Tests for: #BLI_path_parent_dir_end | |
| #define | PARENT_DIR_END(input, offset_expect) |
| blender::TEST (path_utils, ParentDirEnd_Simple) | |
| blender::TEST (path_utils, ParentDirEnd_Redundant) | |
Tests for: #BLI_path_name_at_index | |
| #define | AT_INDEX(str_input, index_input, str_expect) |
| #define | TEST_STR "./a/./b/./c/." |
| #define | TEST_STR ".//a//.//b//.//c//.//" |
| blender::TEST (path_utils, NameAtIndex_Single) | |
| blender::TEST (path_utils, NameAtIndex_SingleNeg) | |
| blender::TEST (path_utils, NameAtIndex_Double) | |
| blender::TEST (path_utils, NameAtIndex_DoublNeg) | |
| blender::TEST (path_utils, NameAtIndex_Misc) | |
| blender::TEST (path_utils, NameAtIndex_MiscNeg) | |
| blender::TEST (path_utils, NameAtIndex_SingleDot) | |
| blender::TEST (path_utils, NameAtIndex_SingleDotNeg) | |
| blender::TEST (path_utils, NameAtIndex_SingleDotDoubleSlash) | |
| blender::TEST (path_utils, NameAtIndex_SingleDotDoubleSlashNeg) | |
| blender::TEST (path_utils, NameAtIndex_SingleDotSeries) | |
| blender::TEST (path_utils, NameAtIndex_SingleDotSeriesNeg) | |
| blender::TEST (path_utils, NameAtIndex_MiscComplex) | |
| blender::TEST (path_utils, NameAtIndex_MiscComplexNeg) | |
| blender::TEST (path_utils, NameAtIndex_NoneComplex) | |
| blender::TEST (path_utils, NameAtIndex_NoneComplexNeg) | |
Tests for: #BLI_path_join | |
| #define | JOIN_FORWARD_SLASH(str_expect, out_size, ...) |
| #define | JOIN_BACK_SLASH(str_expect, out_size, ...) |
| #define | JOIN JOIN_FORWARD_SLASH |
| blender::TEST (path_utils, JoinNop) | |
| blender::TEST (path_utils, JoinSingle) | |
| blender::TEST (path_utils, JoinTriple) | |
| blender::TEST (path_utils, JoinTruncateShort) | |
| blender::TEST (path_utils, JoinTruncateLong) | |
| blender::TEST (path_utils, JoinComplex) | |
| blender::TEST (path_utils, JoinRelativePrefix) | |
Tests for: #BLI_path_append | |
| #define | APPEND(str_expect, size, path, filename) |
| blender::TEST (path_utils, AppendFile) | |
| blender::TEST (path_utils, AppendFile_Truncate) | |
Tests for: #BLI_path_frame_strip | |
| #define | PATH_FRAME_STRIP(input_path, expect_path, expect_ext) |
| blender::TEST (path_utils, FrameStrip) | |
Tests for: #BLI_path_extension_check | |
| #define | PATH_EXTENSION_CHECK(input_path, input_ext, expect_ext) |
| blender::TEST (path_utils, ExtensionCheck) | |
Tests for: #BLI_path_extension_replace | |
| #define | PATH_EXTENSION_REPLACE_WITH_MAXLEN(input_path, input_ext, expect_result, expect_path, maxlen) |
| #define | PATH_EXTENSION_REPLACE(input_path, input_ext, expect_result, expect_path) |
| blender::TEST (path_utils, ExtensionReplace) | |
| blender::TEST (path_utils, ExtensionReplace_Overflow) | |
Tests for: #BLI_path_extension_ensure | |
| #define | PATH_EXTENSION_ENSURE_WITH_MAXLEN(input_path, input_ext, expect_result, expect_path, maxlen) |
| #define | PATH_EXTENSION_ENSURE(input_path, input_ext, expect_result, expect_path) |
| blender::TEST (path_utils, ExtensionEnsure) | |
| blender::TEST (path_utils, ExtensionEnsure_Overflow) | |
Tests for: #BLI_path_frame_check_chars | |
| #define | PATH_FRAME_CHECK_CHARS(input_path, expect_hasChars) |
| blender::TEST (path_utils, FrameCheckChars) | |
Tests for: #BLI_path_frame_range | |
| #define | PATH_FRAME_RANGE(input_path, sta, end, digits, expect_outpath) |
| blender::TEST (path_utils, FrameRange) | |
Tests for: #BLI_path_frame_get | |
| #define | PATH_FRAME_GET(input_path, expect_frame, expect_numdigits, expect_pathisvalid) |
| blender::TEST (path_utils, FrameGet) | |
Tests for: #BLI_path_sequence_decode | |
| #define | PATH_SEQ_DECODE(path_literal, expect_result, expect_head, expect_tail, expect_numdigits) |
| blender::TEST (path_utils, SequenceDecode) | |
Tests for: #BLI_path_suffix | |
| #define | PATH_SUFFIX(path_literal, path_literal_max, sep, suffix, expect_result, expect_path) |
| blender::TEST (path_utils, Suffix) | |
Tests for: #BLI_path_slash_find | |
| #define | PATH_SLASH_FIND(path, expect_index) |
| blender::TEST (path_util, SlashFind) | |
Tests for: #BLI_path_slash_rfind | |
| #define | PATH_SLASH_RFIND(path, expect_index) |
| blender::TEST (path_util, SlashRFind) | |
Tests for: #BLI_path_slash_ensure | |
| #define | PATH_SLASH_ENSURE(input, size, output_expect, length_expect) |
| blender::TEST (path_util, SlashEnsure) | |
Tests for: #BLI_path_slash_rstrip | |
| #define | PATH_SLASH_RSTRIP(input, expected) |
| blender::TEST (path_util, SlashRStrip) | |
Tests for: #BLI_path_slash_skip | |
| #define | PATH_SLASH_SKIP(input, expected) |
| blender::TEST (path_util, SlashSkip) | |
Tests for: #BLI_path_slash_native | |
| #define | PATH_SLASH_NATIVE(input, expected) |
| blender::TEST (path_util, SlashNative) | |
Tests for: #BLI_path_rel | |
| #define | PATH_REL(abs_path, ref_path, rel_path_expect) |
| blender::TEST (path_utils, RelPath_Simple) | |
| blender::TEST (path_utils, RelPath_SimpleSubdir) | |
| blender::TEST (path_utils, RelPath_SameDir) | |
| blender::TEST (path_utils, RelPath_ParentDir) | |
| blender::TEST (path_utils, RelPath_NoCommonRoot) | |
| blender::TEST (path_utils, RelPath_BufferOverflowRoot) | |
| blender::TEST (path_utils, RelPath_BufferOverflowSubdir) | |
Tests for: #BLI_path_abs | |
| #define | PATH_ABS(rel_path, base_path, abs_path_expect, result_expect) |
| blender::TEST (path_utils, AbsPath_Simple) | |
| blender::TEST (path_utils, AbsPath_BaseDir) | |
| blender::TEST (path_utils, AbsPath_PrefixOnly) | |
| blender::TEST (path_utils, AbsPath_ParentDir) | |
| blender::TEST (path_utils, AbsPath_BackSlash) | |
| blender::TEST (path_utils, AbsPath_NotRelative) | |
| blender::TEST (path_utils, AbsPath_Win32DriveOnPosix) | |
| blender::TEST (path_utils, AbsPath_ExtraSlashes) | |
| blender::TEST (path_utils, AbsPath_NoBaseDir) | |
| blender::TEST (path_utils, AbsPath_NoBaseDirExtraSlashes) | |
| blender::TEST (path_utils, AbsPath_BufferOverflow) | |
| #define ABS_PREFIX "" |
Definition at line 25 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define APPEND | ( | str_expect, | |
| size, | |||
| path, | |||
| filename ) |
Definition at line 778 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), and blender::TEST().
| #define AT_INDEX | ( | str_input, | |
| index_input, | |||
| str_expect ) |
Definition at line 303 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define DO_PERF_TESTS 0 |
Definition at line 16 of file BLI_path_utils_test.cc.
| #define JOIN JOIN_FORWARD_SLASH |
Definition at line 675 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define JOIN_BACK_SLASH | ( | str_expect, | |
| out_size, | |||
| ... ) |
Definition at line 647 of file BLI_path_utils_test.cc.
| #define JOIN_FORWARD_SLASH | ( | str_expect, | |
| out_size, | |||
| ... ) |
Definition at line 632 of file BLI_path_utils_test.cc.
| #define NORMALIZE | ( | input, | |
| output_expect ) |
Definition at line 58 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define PARENT_DIR | ( | input, | |
| output_expect ) |
Definition at line 200 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define PARENT_DIR_END | ( | input, | |
| offset_expect ) |
Definition at line 268 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), and blender::TEST().
| #define PATH_ABS | ( | rel_path, | |
| base_path, | |||
| abs_path_expect, | |||
| result_expect ) |
Definition at line 1756 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define PATH_EXTENSION_CHECK | ( | input_path, | |
| input_ext, | |||
| expect_ext ) |
Definition at line 1045 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_EXTENSION_ENSURE | ( | input_path, | |
| input_ext, | |||
| expect_result, | |||
| expect_path ) |
Definition at line 1176 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_EXTENSION_ENSURE_WITH_MAXLEN | ( | input_path, | |
| input_ext, | |||
| expect_result, | |||
| expect_path, | |||
| maxlen ) |
Definition at line 1159 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_EXTENSION_REPLACE | ( | input_path, | |
| input_ext, | |||
| expect_result, | |||
| expect_path ) |
Definition at line 1105 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_EXTENSION_REPLACE_WITH_MAXLEN | ( | input_path, | |
| input_ext, | |||
| expect_result, | |||
| expect_path, | |||
| maxlen ) |
Definition at line 1088 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_FRAME_CHECK_CHARS | ( | input_path, | |
| expect_hasChars ) |
Definition at line 1224 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_FRAME_GET | ( | input_path, | |
| expect_frame, | |||
| expect_numdigits, | |||
| expect_pathisvalid ) |
Definition at line 1309 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_FRAME_RANGE | ( | input_path, | |
| sta, | |||
| end, | |||
| digits, | |||
| expect_outpath ) |
Definition at line 1261 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_FRAME_STRIP | ( | input_path, | |
| expect_path, | |||
| expect_ext ) |
Definition at line 982 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_REL | ( | abs_path, | |
| ref_path, | |||
| rel_path_expect ) |
Definition at line 1667 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define PATH_SEQ_DECODE | ( | path_literal, | |
| expect_result, | |||
| expect_head, | |||
| expect_tail, | |||
| expect_numdigits ) |
Definition at line 1348 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_ENSURE | ( | input, | |
| size, | |||
| output_expect, | |||
| length_expect ) |
Definition at line 1491 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_FIND | ( | path, | |
| expect_index ) |
Definition at line 1427 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_NATIVE | ( | input, | |
| expected ) |
Definition at line 1600 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_RFIND | ( | path, | |
| expect_index ) |
Definition at line 1458 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_RSTRIP | ( | input, | |
| expected ) |
Definition at line 1529 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SLASH_SKIP | ( | input, | |
| expected ) |
Definition at line 1565 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define PATH_SUFFIX | ( | path_literal, | |
| path_literal_max, | |||
| sep, | |||
| suffix, | |||
| expect_result, | |||
| expect_path ) |
Definition at line 1385 of file BLI_path_utils_test.cc.
Referenced by blender::TEST().
| #define TEST_STR ".//a//.//b//.//c//.//" |
Definition at line 400 of file BLI_path_utils_test.cc.
| #define TEST_STR "./a/./b/./c/." |
Definition at line 400 of file BLI_path_utils_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().