mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Add regression tests
This commit is contained in:
parent
0ec2911857
commit
a4d0b5c522
2 changed files with 90 additions and 2 deletions
|
@ -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#""#]],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue