mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-26 01:40:36 +00:00
fix: fix test_resolve_relative_path_relative on windows (#7039)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user