Home
last modified time | relevance | path

Searched refs:from_file_path (Results 1 – 2 of 2) sorted by relevance

/external/rust/crates/url/tests/
Dunit.rs71 let url = Url::from_file_path(Path::new($path)).unwrap();
81 assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); in new_file_paths()
82 assert_eq!(Url::from_file_path(Path::new("../relative")), Err(())); in new_file_paths()
85 assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); in new_file_paths()
86 assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(())); in new_file_paths()
87 assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(())); in new_file_paths()
88 assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(())); in new_file_paths()
104 let url = Url::from_file_path(Path::new(OsStr::from_bytes(b"/foo/ba\x80r"))).unwrap(); in new_path_bad_utf8()
123 assert!(Url::from_file_path(path).is_ok()); in new_path_windows_fun()
390 let mut url = Url::from_file_path("/").expect("Failed to parse path"); in issue_197()
[all …]
/external/rust/crates/url/src/
Dlib.rs2303 pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { in from_file_path() method
2341 let mut url = Url::from_file_path(path)?; in from_directory_path()