From 92c7c3493e66e975ecfa8664524c88354ab16a16 Mon Sep 17 00:00:00 2001 From: Lucas Morales Date: Fri, 13 Oct 2017 02:05:34 -0400 Subject: [PATCH] Add fragment URI parsing tests. --- lib/src/http/uri.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/http/uri.rs b/lib/src/http/uri.rs index a78a7fee..bd9453fe 100644 --- a/lib/src/http/uri.rs +++ b/lib/src/http/uri.rs @@ -546,6 +546,8 @@ mod tests { test_query("/////", None); test_query("//a///", None); test_query("/a/b/c#a?123", None); + test_query("/#", None); + test_query("/#?", None); } #[test] @@ -564,8 +566,10 @@ mod tests { fn fragment_exists() { test_fragment("/test#abc", Some("abc")); test_fragment("/#abc", Some("abc")); + test_fragment("/#ab?c", Some("ab?c")); test_fragment("/a/b/c?123#a", Some("a")); test_fragment("/a/b/c#a?123", Some("a?123")); + test_fragment("/a/b/c?123#a?b", Some("a?b")); test_fragment("/#a", Some("a")); }