mirror of https://github.com/rwf2/Rocket.git
Add fragment URI parsing tests.
This commit is contained in:
parent
40688a26a6
commit
92c7c3493e
|
@ -546,6 +546,8 @@ mod tests {
|
||||||
test_query("/////", None);
|
test_query("/////", None);
|
||||||
test_query("//a///", None);
|
test_query("//a///", None);
|
||||||
test_query("/a/b/c#a?123", None);
|
test_query("/a/b/c#a?123", None);
|
||||||
|
test_query("/#", None);
|
||||||
|
test_query("/#?", None);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -564,8 +566,10 @@ mod tests {
|
||||||
fn fragment_exists() {
|
fn fragment_exists() {
|
||||||
test_fragment("/test#abc", Some("abc"));
|
test_fragment("/test#abc", Some("abc"));
|
||||||
test_fragment("/#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?123#a", Some("a"));
|
||||||
test_fragment("/a/b/c#a?123", Some("a?123"));
|
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"));
|
test_fragment("/#a", Some("a"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue