Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs/src/vfs_path/tests.rs')
-rw-r--r--crates/vfs/src/vfs_path/tests.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/vfs/src/vfs_path/tests.rs b/crates/vfs/src/vfs_path/tests.rs
index 2d89362ee0..c21fabfbf0 100644
--- a/crates/vfs/src/vfs_path/tests.rs
+++ b/crates/vfs/src/vfs_path/tests.rs
@@ -1,6 +1,14 @@
use super::*;
#[test]
+fn virtual_path_starts_with_is_component_based() {
+ let path = |path: &str| VfsPath::new_virtual_path(path.to_owned());
+
+ assert!(!path("/foobar").starts_with(&path("/foo")));
+ assert!(path("/foo/bar").starts_with(&path("/foo")));
+}
+
+#[test]
fn virtual_path_extensions() {
assert_eq!(VirtualPath("/".to_owned()).name_and_extension(), None);
assert_eq!(