Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/doc_links/tests.rs')
-rw-r--r--crates/ide/src/doc_links/tests.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ide/src/doc_links/tests.rs b/crates/ide/src/doc_links/tests.rs
index 6af156fa66..c2f08f8ca2 100644
--- a/crates/ide/src/doc_links/tests.rs
+++ b/crates/ide/src/doc_links/tests.rs
@@ -415,6 +415,30 @@ fn foo() {
}
#[test]
+fn external_docs_macro_export() {
+ check_external_docs(
+ r#"
+//- /lib.rs crate:foo
+pub mod inner {
+ #[macro_export]
+ macro_rules! my_macro {
+ () => {};
+ }
+}
+
+//- /main.rs crate:bar deps:foo
+fn main() {
+ foo::my_m$0acro!();
+}
+ "#,
+ Some("/home/user/project"),
+ Some(expect![[r#"https://docs.rs/foo/*/foo/macro.my_macro.html"#]]),
+ Some(expect![[r#"file:///home/user/project/doc/foo/macro.my_macro.html"#]]),
+ Some("/sysroot"),
+ );
+}
+
+#[test]
fn doc_links_items_simple() {
check_doc_links(
r#"