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

@ -44,9 +44,9 @@ sha2.workspace = true
smol.workspace = true
theme.workspace = true
tree-sitter.workspace = true
ui. workspace = true
ui.workspace = true
unindent.workspace = true
util. workspace = true
util.workspace = true
workspace.workspace = true
worktree.workspace = true

View file

@ -279,6 +279,7 @@ mod tests {
use settings::SettingsStore;
use smol::channel;
use std::{future, path::Path, sync::Arc};
use util::separator;
fn init_test(cx: &mut TestAppContext) {
env_logger::try_init().ok();
@ -421,7 +422,10 @@ mod tests {
// Find result that is greater than 0.5
let search_result = results.iter().find(|result| result.score > 0.9).unwrap();
assert_eq!(search_result.path.to_string_lossy(), "fixture/needle.md");
assert_eq!(
search_result.path.to_string_lossy(),
separator!("fixture/needle.md")
);
let content = cx
.update(|cx| {