()
| 199 | |
| 200 | #[test] |
| 201 | fn test_localhost() { |
| 202 | let url = "http://localhost:8000".to_string(); |
| 203 | let expected = Ok(Url { |
| 204 | url: url.clone(), |
| 205 | host: "localhost".to_string(), |
| 206 | port: "8000".to_string(), |
| 207 | path: "".to_string(), |
| 208 | searchpart: "".to_string(), |
| 209 | }); |
| 210 | assert_eq!(expected, Url::new(url).parse()); |
| 211 | } |
| 212 | |
| 213 | #[test] |
| 214 | fn test_no_scheme() { |