diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-10-05 14:03:26 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-10-05 14:03:26 -0700 |
commit | f95b6e2d031de4d59dafe094386da6d4a6074dad (patch) | |
tree | 18772e9de9afa60532150f14f4e766d7c20d684e /src | |
parent | da7c16742836067e0a7e921679c54fe16b6fa7ae (diff) |
Add tests for parsing hosts ending in dot
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -441,6 +441,17 @@ mod tests { } #[test] + fn parse_from_string_host_ends_in_dot() { + let uri = uriparse::URIReference::try_from("http://example.com./foo"); + assert!(uri.is_ok()); + let uri = uri.unwrap(); + assert_eq!( + Some(&uriparse::Host::try_from("example.com.").unwrap()), + uri.host() + ); + } + + #[test] fn parse_from_string_dont_misinterpret_colon_in_other_places_as_scheme_delimiter() { let test_vectors = [ "//foo:bar@www.example.com/", |