Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/tests/proc_macros.rs')
-rw-r--r--crates/ide-completion/src/tests/proc_macros.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide-completion/src/tests/proc_macros.rs b/crates/ide-completion/src/tests/proc_macros.rs
index 9eae6f8495..fec149e56a 100644
--- a/crates/ide-completion/src/tests/proc_macros.rs
+++ b/crates/ide-completion/src/tests/proc_macros.rs
@@ -131,3 +131,33 @@ fn main() {}
"#]],
)
}
+
+#[test]
+fn issue_13836_str() {
+ check(
+ r#"
+//- proc_macros: shorten
+fn main() {
+ let s = proc_macros::shorten!("text.$0");
+}
+"#,
+ expect![[r#""#]],
+ )
+}
+
+#[test]
+fn issue_13836_ident() {
+ check(
+ r#"
+//- proc_macros: shorten
+struct S;
+impl S {
+ fn foo(&self) {}
+}
+fn main() {
+ let s = proc_macros::shorten!(S.fo$0);
+}
+"#,
+ expect![[r#""#]],
+ )
+}