mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
move test
This commit is contained in:
parent
0dd1b35479
commit
75b0ce17cf
2 changed files with 26 additions and 22 deletions
|
@ -98,3 +98,29 @@ struct Baz;
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tries_all_branches_matching_ident() {
|
||||
check(
|
||||
r#"
|
||||
macro_rules! m {
|
||||
($ i:ident) => ( mod $ i {} );
|
||||
(spam $ i:ident) => ( fn $ i() {} );
|
||||
(eggs $ i:ident) => ( struct $ i; )
|
||||
}
|
||||
m! { foo }
|
||||
m! { spam bar }
|
||||
m! { eggs Baz }
|
||||
"#,
|
||||
expect![[r#"
|
||||
macro_rules! m {
|
||||
($ i:ident) => ( mod $ i {} );
|
||||
(spam $ i:ident) => ( fn $ i() {} );
|
||||
(eggs $ i:ident) => ( struct $ i; )
|
||||
}
|
||||
mod foo {}
|
||||
fn bar() {}
|
||||
struct Baz;
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue