Fix tests on Windows (#26449)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
张小白 2025-03-11 19:17:48 +08:00 committed by GitHub
parent 401342c6ec
commit f59f2caf7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -901,6 +901,7 @@ mod tests {
use project::FakeFs; use project::FakeFs;
use serde_json::json; use serde_json::json;
use settings::SettingsStore; use settings::SettingsStore;
use util::path;
use super::*; use super::*;
@ -1131,7 +1132,7 @@ mod tests {
let fs = FakeFs::new(cx.executor()); let fs = FakeFs::new(cx.executor());
fs.insert_tree( fs.insert_tree(
"/", path!("/"),
json!({ json!({
"file1.txt": "Hello world!", "file1.txt": "Hello world!",
"file2.txt": "Goodbye moon!" "file2.txt": "Goodbye moon!"
@ -1139,7 +1140,7 @@ mod tests {
) )
.await; .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)); let session = cx.new(|cx| ScriptingSession::new(project, cx));
TestSession { session } TestSession { session }