Remove broken tests.
@@ -266,53 +266,3 @@ pub enum UriError {
BadScheme,
}
-
-//============ Testing =======================================================
-
-#[cfg(test)]
-mod test {
- use super::*;
-
- fn from_parts(
- auth: &'static str,
- module: &'static str,
- path: &'static str,
- is_dir: bool
- ) -> Uri {
- Uri {
- authority: Bytes::from_static(auth.as_bytes()),
- module: Bytes::from_static(module.as_bytes()),
- path: Bytes::from_static(path.as_bytes()),
- is_dir
- }
- }
-
- #[test]
- fn parse() {
- assert_eq!(
- Uri::from_slice(b"rsync://user@foo.bar:322/mod/path").unwrap(),
- from_parts("user@foo.bar:322", "mod", "path", false)
- );
- assert_eq!(
- Uri::from_slice(b"rsync://user@foo.bar:322/mod/path/").unwrap(),
- from_parts("user@foo.bar:322", "mod", "path", true)
- );
- }
-
- #[test]
- fn parent() {
- let uri = Uri::from_slice(b"rsync://auth/mod/a/b/c").unwrap();
- assert_eq!(uri.path(), "a/b/c");
- assert!(!uri.is_dir());
- let uri = uri.parent().unwrap();
- assert_eq!(uri.path(), "a/b");
- assert!(uri.is_dir());
- let uri = uri.parent().unwrap();
- assert_eq!(uri.path(), "a");
- assert!(uri.is_dir());
- let uri = uri.parent().unwrap();
- assert_eq!(uri.path(), "");
- assert!(uri.is_dir());
- assert_eq!(uri.parent(), None)
- }
-}
