From 59bd6e2eea151f097a65f2634dc5488b3c272d92 Mon Sep 17 00:00:00 2001 From: Daiki Ihara Date: Tue, 1 Dec 2020 00:10:12 +0900 Subject: Extract tests module to file in vfs crate --- crates/vfs/src/vfs_path.rs | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'crates/vfs/src/vfs_path.rs') diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs index 815697597..bd14911c9 100644 --- a/crates/vfs/src/vfs_path.rs +++ b/crates/vfs/src/vfs_path.rs @@ -311,35 +311,4 @@ impl VirtualPath { } #[cfg(test)] -mod tests { - use super::*; - - #[test] - fn virtual_path_extensions() { - assert_eq!(VirtualPath("/".to_string()).name_and_extension(), None); - assert_eq!( - VirtualPath("/directory".to_string()).name_and_extension(), - Some(("directory", None)) - ); - assert_eq!( - VirtualPath("/directory/".to_string()).name_and_extension(), - Some(("directory", None)) - ); - assert_eq!( - VirtualPath("/directory/file".to_string()).name_and_extension(), - Some(("file", None)) - ); - assert_eq!( - VirtualPath("/directory/.file".to_string()).name_and_extension(), - Some((".file", None)) - ); - assert_eq!( - VirtualPath("/directory/.file.rs".to_string()).name_and_extension(), - Some((".file", Some("rs"))) - ); - assert_eq!( - VirtualPath("/directory/file.rs".to_string()).name_and_extension(), - Some(("file", Some("rs"))) - ); - } -} +mod tests; -- cgit v1.2.3