From 4a3c5f85e5629cc5b9488b50c9fde20cabe0409f Mon Sep 17 00:00:00 2001 From: localhost Date: Sun, 28 Sep 2025 21:03:57 +0800 Subject: [PATCH] fix: fix test_resolve_relative_path_relative on windows (#7039) --- src/cli/src/utils.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli/src/utils.rs b/src/cli/src/utils.rs index 54a17d8959..b22eb5df2e 100644 --- a/src/cli/src/utils.rs +++ b/src/cli/src/utils.rs @@ -63,9 +63,10 @@ mod tests { let expected = "/tmp/foo/bar"; let result = resolve_relative_path(¤t_dir, rel_path); // On Windows, the separator is '\', so normalize for comparison + // '/' is as a normal character in Windows paths if cfg!(windows) { - assert!(result.ends_with("foo\\bar")); - assert!(result.contains("\\tmp\\") || result.contains("C:\\tmp\\")); + assert!(result.ends_with("foo/bar")); + assert!(result.contains("/tmp\\")); } else { assert_eq!(result, expected); }