Add another attribute completion test

This commit is contained in:
Lukas Wirth 2021-05-28 01:09:22 +02:00
parent 0724bd0f21
commit 411eee7614

View File

@ -318,6 +318,26 @@ mod tests {
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]
fn complete_attribute_on_source_file() {
check(
@ -731,9 +751,4 @@ mod tests {
"#]],
);
}
#[test]
fn test_attribute_completion_inside_nested_attr() {
check(r#"#[cfg($0)]"#, expect![[]])
}
}