()
| 347 | |
| 348 | #[test] |
| 349 | fn test_parse_proxy_addr() { |
| 350 | assert_eq!( |
| 351 | parse_proxy_addr("127.0.0.1:9050").unwrap(), |
| 352 | "127.0.0.1:9050".parse().unwrap() |
| 353 | ); |
| 354 | assert_eq!( |
| 355 | parse_proxy_addr("127.0.0.1").unwrap(), |
| 356 | "127.0.0.1:9050".parse().unwrap() |
| 357 | ); |
| 358 | |
| 359 | for proxy in ["::1", "[::1]:9050"] { |
| 360 | let err = parse_proxy_addr(proxy).unwrap_err().to_string(); |
| 361 | assert!(err.contains("IPv6 proxy addresses are not supported")); |
| 362 | } |
| 363 | |
| 364 | assert!(parse_proxy_addr("not-an-address").is_err()); |
| 365 | } |
| 366 | |
| 367 | fn gather_sources( |
| 368 | plugin: &ConfiguredPlugin<PluginState, tokio::io::Stdin, tokio::io::Stdout>, |
nothing calls this directly
no test coverage detected