windows: Fix tests on Windows (#22616)

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
This commit is contained in:
张小白 2025-02-05 22:30:09 +08:00 committed by GitHub
parent c252b5db16
commit 74c4dbd237
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 1540 additions and 856 deletions

View file

@ -11,6 +11,7 @@ use lsp_log::LogKind;
use project::{FakeFs, Project};
use serde_json::json;
use settings::SettingsStore;
use util::path;
#[gpui::test]
async fn test_lsp_logs(cx: &mut TestAppContext) {
@ -22,7 +23,7 @@ async fn test_lsp_logs(cx: &mut TestAppContext) {
let fs = FakeFs::new(cx.background_executor.clone());
fs.insert_tree(
"/the-root",
path!("/the-root"),
json!({
"test.rs": "",
"package.json": "",
@ -30,7 +31,7 @@ async fn test_lsp_logs(cx: &mut TestAppContext) {
)
.await;
let project = Project::test(fs.clone(), ["/the-root".as_ref()], cx).await;
let project = Project::test(fs.clone(), [path!("/the-root").as_ref()], cx).await;
let language_registry = project.read_with(cx, |project, _| project.languages().clone());
language_registry.add(Arc::new(Language::new(
@ -57,7 +58,7 @@ async fn test_lsp_logs(cx: &mut TestAppContext) {
let _rust_buffer = project
.update(cx, |project, cx| {
project.open_local_buffer_with_lsp("/the-root/test.rs", cx)
project.open_local_buffer_with_lsp(path!("/the-root/test.rs"), cx)
})
.await
.unwrap();