Skip to content

Commit 1bd21e9

Browse files
committed
test: add test for excluding refs
1 parent 6f303f4 commit 1bd21e9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

crates/ide/src/references.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,30 @@ mod tests {
307307

308308
use crate::{fixture, SearchScope};
309309

310+
#[test]
311+
fn exclude_tests() {
312+
check(
313+
r#"
314+
fn test_func() {}
315+
316+
fn func() {
317+
test_func$0();
318+
}
319+
320+
#[test]
321+
fn test() {
322+
test_func();
323+
}
324+
"#,
325+
expect![[r#"
326+
test_func Function FileId(0) 0..17 3..12
327+
328+
FileId(0) 35..44
329+
FileId(0) 75..84 Test
330+
"#]],
331+
);
332+
}
333+
310334
#[test]
311335
fn test_struct_literal_after_space() {
312336
check(

0 commit comments

Comments
 (0)