Add a dash test

This commit is contained in:
Kirill Bulatov 2020-10-02 20:59:32 +03:00
parent 673e1ddb9a
commit cae2e859ff
2 changed files with 32 additions and 2 deletions

View file

@ -3163,4 +3163,34 @@ fn main() { let s<|>t = test().get(); }
"#]],
);
}
#[test]
fn hover_displays_normalized_crate_names() {
check(
r#"
//- /lib.rs crate:name-with-dashes
pub mod wrapper {
pub struct Thing { x: u32 }
impl Thing {
pub fn new() -> Thing { Thing { x: 0 } }
}
}
//- /main.rs crate:main deps:name-with-dashes
fn main() { let foo_test = name_with_dashes::wrapper::Thing::new<|>(); }
"#,
expect![[r#"
*new*
```rust
name_with_dashes::wrapper::Thing
```
```rust
pub fn new() -> Thing
```
"#]],
)
}
}