diff --git a/crates/acp_thread/src/mention.rs b/crates/acp_thread/src/mention.rs index 0b6c0b482b8b048dbb0f6c4c3991a6255a1ef548..bbcf31a4fa2f0307987999af0543624bec05972c 100644 --- a/crates/acp_thread/src/mention.rs +++ b/crates/acp_thread/src/mention.rs @@ -506,6 +506,15 @@ mod tests { assert_eq!(parsed.to_uri().to_string(), file_uri); } + #[test] + fn test_directory_uri_inserts_trailing_slash() { + let uri = MentionUri::Directory { + abs_path: PathBuf::from(path!("/path/to/dir")), + }; + let expected = uri!("file:///path/to/dir/"); + assert_eq!(uri.to_uri().to_string(), expected); + } + #[test] fn test_to_directory_uri_without_slash() { let uri = MentionUri::Directory {