internal: add auto-import assist tests for raw identifiers

This commit is contained in:
davidsemakula 2024-04-09 18:08:25 +03:00
parent e326b634d1
commit 8e459125df

View File

@ -1620,4 +1620,50 @@ pub fn bar() -> IoResult$0<()> {}
"#,
);
}
#[test]
fn preserve_raw_identifiers_strict() {
check_assist(
auto_import,
r"
r#as$0
pub mod ffi_mod {
pub fn r#as() {};
}
",
r"
use ffi_mod::r#as;
r#as
pub mod ffi_mod {
pub fn r#as() {};
}
",
);
}
#[test]
fn preserve_raw_identifiers_reserved() {
check_assist(
auto_import,
r"
r#abstract$0
pub mod ffi_mod {
pub fn r#abstract() {};
}
",
r"
use ffi_mod::r#abstract;
r#abstract
pub mod ffi_mod {
pub fn r#abstract() {};
}
",
);
}
}