Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
| -rw-r--r-- | crates/ide/src/syntax_highlighting/tests.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index c14e3330e3..599def0341 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -335,6 +335,26 @@ where } #[test] +fn test_keyword_highlighting() { + check_highlighting( + r#" +extern crate self; + +use crate; +use self; +mod __ { + use super::*; +} + +struct __ where Self:; +fn __(_: Self) {} +"#, + expect_file!["./test_data/highlight_keywords.html"], + false, + ); +} + +#[test] fn test_string_highlighting() { // The format string detection is based on macro-expansion, // thus, we have to copy the macro definition from `std` |