Lines Matching refs:from_file_path
71 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()
729 let url = Url::from_file_path(Path::new(r"\\host\share\path\file.txt")).unwrap(); in test_windows_unc_path()
732 let url = Url::from_file_path(Path::new(r"\\höst\share\path\file.txt")).unwrap(); in test_windows_unc_path()
735 let url = Url::from_file_path(Path::new(r"\\192.168.0.1\share\path\file.txt")).unwrap(); in test_windows_unc_path()
742 let url = Url::from_file_path(Path::new(r"\\?\UNC\host\share\path\file.txt")).unwrap(); in test_windows_unc_path()
746 let url = Url::from_file_path(Path::new(r"\\.\some\path\file.txt")); in test_windows_unc_path()
842 let u = Url::from_file_path(p).unwrap(); in test_url_from_file_path()
855 let u = Url::from_file_path(p).unwrap();