internal: add auto-import assist tests for raw identifiers
This commit is contained in:
parent
e326b634d1
commit
8e459125df
@ -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() {};
|
||||
}
|
||||
",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user