From fd4d63a34c3b17ee674061d16a76db44dc5d4a86 Mon Sep 17 00:00:00 2001 From: MK Date: Thu, 9 Oct 2025 14:30:00 +0800 Subject: [PATCH] chore: test normalize file names --- crates/vite_path/src/relative.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/vite_path/src/relative.rs b/crates/vite_path/src/relative.rs index 271f9d5731..39f63228d0 100644 --- a/crates/vite_path/src/relative.rs +++ b/crates/vite_path/src/relative.rs @@ -323,6 +323,14 @@ mod tests { assert_eq!(rel_path.as_str(), "foo/bar"); } + #[test] + fn normalize_filenames() { + let rel_path = RelativePathBuf::new("foo").unwrap(); + assert_eq!(rel_path.as_str(), "foo"); + let rel_path = RelativePathBuf::new("foo.json").unwrap(); + assert_eq!(rel_path.as_str(), "foo.json"); + } + #[test] fn normalize_dots() { let rel_path = RelativePathBuf::new("./foo/./bar/.").unwrap();