diff --git a/Cargo.lock b/Cargo.lock index 8ddc492d..301e557d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -706,9 +706,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "url" diff --git a/Cargo.toml b/Cargo.toml index e9ab1d3a..29ddd588 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ git2 = { version = "0.19.0", default-features = false } libc = "0.2.161" log = { version = "0.4.22", features = ["std"] } unicode-segmentation = "1.12.0" -unicode-width = "0.1.13" +unicode-width = "0.2.0" [dev-dependencies] pretty_assertions = "1.4.1" diff --git a/src/matched_path.rs b/src/matched_path.rs index 09ebd1d9..528395c5 100644 --- a/src/matched_path.rs +++ b/src/matched_path.rs @@ -483,7 +483,7 @@ mod tests { new("👩‍🔬🗑", "C:\\", "C:\\Documents\\👩‍🔬\\🦑\\abcde\\🗑🌍.txt").absolute_chunks(24), vec![ Chunk { - value: String::from("..."), + value: String::from("...s\\"), matched: false }, Chunk { @@ -635,7 +635,15 @@ mod tests { new("👩‍🔬☕", "C:\\", "C:\\Documents\\👩‍🔬\\🦑\\abcde\\☕🌍.txt").relative_chunks(24), vec![ Chunk { - value: String::from("...\\🦑\\abcde\\"), + value: String::from("...\\"), + matched: false, + }, + Chunk { + value: String::from("👩‍🔬"), + matched: true, + }, + Chunk { + value: String::from("\\🦑\\abcde\\"), matched: false, }, Chunk {