Skip to content

Visual Studio Code, rebuilt in Rust

Rust

test(windows): expect slash paths in copied path labels

rokartur8c3c7d0602be
diff --git a/native/crates/app/src/quick_input/tests.rs b/native/crates/app/src/quick_input/tests.rs
index 5cd352ac048..808ffcf18d5 100644
--- a/native/crates/app/src/quick_input/tests.rs
+++ b/native/crates/app/src/quick_input/tests.rs
@@ -392,7 +392,7 @@ fn copied_path_labels_have_no_prefix() {
assert_eq!(label("/testWorkspace", true, "/"), "");
assert_eq!(label("/other/file", true, "/"), "/other/file", "outside the workspace: absolute");
let home = std::env::var("HOME").unwrap();
- assert_eq!(label(&format!("{home}/file"), false, "/"), format!("{home}/file"), "never tildified");
+ assert_eq!(label(&format!("{home}/file"), false, "/"), format!("{home}/file").replace('\\', "/"), "never tildified");
use config::workspace::WorkspaceFolder;
let folder = |path: &str, name: &str| WorkspaceFolder { path: PathBuf::from(path), name: name.into() };