cfg gated tests that only work on windows.
This commit is contained in:
@@ -325,6 +325,11 @@ fn url_from_path_with_drive_lowercasing(path: impl AsRef<Path>) -> Result<Url> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// `Url` is not able to parse windows paths on unix machines.
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
#[cfg(test)]
|
||||||
|
mod path_conversion_windows_tests {
|
||||||
|
use super::url_from_path_with_drive_lowercasing;
|
||||||
#[test]
|
#[test]
|
||||||
fn test_lowercase_drive_letter_with_drive() {
|
fn test_lowercase_drive_letter_with_drive() {
|
||||||
let url = url_from_path_with_drive_lowercasing("C:\\Test").unwrap();
|
let url = url_from_path_with_drive_lowercasing("C:\\Test").unwrap();
|
||||||
@@ -338,3 +343,4 @@ fn test_drive_without_colon_passthrough() {
|
|||||||
|
|
||||||
assert_eq!(url.to_string(), "file://localhost/C$/my_dir");
|
assert_eq!(url.to_string(), "file://localhost/C$/my_dir");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user