Skip to content

Commit 04dbe06

Browse files
committed
test(adapters): add backslash middle four dots test in sanitize_path
Verify that sanitize_path preserves backslash-bounded '....' directory components (e.g. '\a\....\b\' -> 'a/..../b') accurately.
1 parent 1202b3a commit 04dbe06

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎crates/lore-core/src/adapters/common.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ mod tests {
469469
assert_eq!(sanitize_path(r"\a\.\b\"), "a/b");
470470
assert_eq!(sanitize_path(r"\a\..\b\"), "b");
471471
assert_eq!(sanitize_path(r"\a\...\b\"), "a/.../b");
472+
assert_eq!(sanitize_path(r"\a\....\b\"), "a/..../b");
472473
assert_eq!(sanitize_path(r"a/b\c/d\file.rs"), "a/b/c/d/file.rs");
473474
assert_eq!(sanitize_path("///"), "");
474475
assert_eq!(sanitize_path(r"\\\"), "");

0 commit comments

Comments
 (0)