From 47682e3f2eacef105ffc7c3b409df3aa37063d89 Mon Sep 17 00:00:00 2001 From: Martin Hoffmann Date: Thu, 26 Jul 2018 16:38:40 +0200 Subject: [PATCH] Remove broken tests. --- src/rsync.rs | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/rsync.rs b/src/rsync.rs index 8be5b4a..990cecd 100644 --- a/src/rsync.rs +++ b/src/rsync.rs @@ -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) - } -}