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 730efff0d..09062c38e 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -391,6 +391,23 @@ macro_rules! noop {
391 ); 391 );
392} 392}
393 393
394#[test]
395fn test_extern_crate() {
396 check_highlighting(
397 r#"
398 //- /main.rs
399 extern crate std;
400 extern crate alloc as abc;
401 //- /std/lib.rs
402 pub struct S;
403 //- /alloc/lib.rs
404 pub struct A
405 "#,
406 expect_file!["crates/ra_ide/test_data/highlight_extern_crate.html"],
407 false,
408 );
409}
410
394/// Highlights the code given by the `ra_fixture` argument, renders the 411/// Highlights the code given by the `ra_fixture` argument, renders the
395/// result as HTML, and compares it with the HTML file given as `snapshot`. 412/// result as HTML, and compares it with the HTML file given as `snapshot`.
396/// Note that the `snapshot` file is overwritten by the rendered HTML. 413/// Note that the `snapshot` file is overwritten by the rendered HTML.