aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
authorLeander Tentrup <[email protected]>2020-04-17 21:23:23 +0100
committerLeander Tentrup <[email protected]>2020-04-17 21:50:30 +0100
commit2e2c03ee2d7ef20fd6e20151507d26a4407c835e (patch)
treeee8cc13d15c16fdaa60c9a1156456b4bc62d7dda /crates/ra_ide/src/syntax_highlighting
parent8a4cebafca257f6d3294744d0e9e3d461c954645 (diff)
Fix incorrect order of syntax highlight ranges
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index 110887c2a..73611e23a 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -156,3 +156,15 @@ fn main() {
156 fs::write(dst_file, &actual_html).unwrap(); 156 fs::write(dst_file, &actual_html).unwrap();
157 assert_eq_text!(expected_html, actual_html); 157 assert_eq_text!(expected_html, actual_html);
158} 158}
159
160#[test]
161fn ranges_sorted() {
162 let (analysis, file_id) = single_file(
163 r#"
164#[foo(bar = "bar")]
165macro_rules! test {}
166}"#
167 .trim(),
168 );
169 let _ = analysis.highlight(file_id).unwrap();
170}