mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add another attribute completion test
This commit is contained in:
parent
0724bd0f21
commit
411eee7614
@ -318,6 +318,26 @@ mod tests {
|
|||||||
expect.assert_eq(&actual);
|
expect.assert_eq(&actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_attribute_completion_inside_nested_attr() {
|
||||||
|
check(r#"#[cfg($0)]"#, expect![[]])
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_attribute_completion_with_existing_attr() {
|
||||||
|
check(
|
||||||
|
r#"#[no_mangle] #[$0] mcall!();"#,
|
||||||
|
expect![[r#"
|
||||||
|
at allow(…)
|
||||||
|
at cfg(…)
|
||||||
|
at cfg_attr(…)
|
||||||
|
at deny(…)
|
||||||
|
at forbid(…)
|
||||||
|
at warn(…)
|
||||||
|
"#]],
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn complete_attribute_on_source_file() {
|
fn complete_attribute_on_source_file() {
|
||||||
check(
|
check(
|
||||||
@ -731,9 +751,4 @@ mod tests {
|
|||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_attribute_completion_inside_nested_attr() {
|
|
||||||
check(r#"#[cfg($0)]"#, expect![[]])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user