From f59f2caf7e4e1491703ae2145aace86508ba56d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B0=8F=E7=99=BD?= <364772080@qq.com> Date: Tue, 11 Mar 2025 19:17:48 +0800 Subject: [PATCH] Fix tests on Windows (#26449) Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/scripting_tool/src/scripting_session.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/scripting_tool/src/scripting_session.rs b/crates/scripting_tool/src/scripting_session.rs index 465398d52fdb2361e1802344801b43ef9f329c09..027bdd79329d1776a2aee53c433c20feec5f4211 100644 --- a/crates/scripting_tool/src/scripting_session.rs +++ b/crates/scripting_tool/src/scripting_session.rs @@ -901,6 +901,7 @@ mod tests { use project::FakeFs; use serde_json::json; use settings::SettingsStore; + use util::path; use super::*; @@ -1131,7 +1132,7 @@ mod tests { let fs = FakeFs::new(cx.executor()); fs.insert_tree( - "/", + path!("/"), json!({ "file1.txt": "Hello world!", "file2.txt": "Goodbye moon!" @@ -1139,7 +1140,7 @@ mod tests { ) .await; - let project = Project::test(fs.clone(), [Path::new("/")], cx).await; + let project = Project::test(fs.clone(), [Path::new(path!("/"))], cx).await; let session = cx.new(|cx| ScriptingSession::new(project, cx)); TestSession { session }