Skip to content

Commit c26c85e

Browse files
committed
test(adapters): add multiple forward slashes around double dot test in sanitize_path
Verify that sanitize_path reduces paths containing multiple forward slashes around parent directory marker (e.g. '///..///') to empty string.
1 parent 70ac46a commit c26c85e

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
@@ -485,6 +485,7 @@ mod tests {
485485
assert_eq!(sanitize_path(r"\\\.\\\"), "");
486486
assert_eq!(sanitize_path(r"///.\\\\"), "");
487487
assert_eq!(sanitize_path(r"\\\.///"), "");
488+
assert_eq!(sanitize_path("///..///"), "");
488489
assert_eq!(sanitize_path("."), "");
489490
assert_eq!(sanitize_path("./"), "");
490491
assert_eq!(sanitize_path(".."), "");

0 commit comments

Comments
 (0)