aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index b9b358022..b8d60bdc6 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -380,6 +380,23 @@ macro_rules! noop {
380 ); 380 );
381} 381}
382 382
383#[test]
384fn test_extern_crate() {
385 check_highlighting(
386 r#"
387 //- /main.rs
388 extern crate std;
389 extern crate alloc as abc;
390 //- /std/lib.rs
391 pub struct S;
392 //- /alloc/lib.rs
393 pub struct A
394 "#,
395 expect_file!["crates/ra_ide/test_data/highlight_extern_crate.html"],
396 false,
397 );
398}
399
383/// Highlights the code given by the `ra_fixture` argument, renders the 400/// Highlights the code given by the `ra_fixture` argument, renders the
384/// result as HTML, and compares it with the HTML file given as `snapshot`. 401/// result as HTML, and compares it with the HTML file given as `snapshot`.
385/// Note that the `snapshot` file is overwritten by the rendered HTML. 402/// Note that the `snapshot` file is overwritten by the rendered HTML.