Fix incorrect order of syntax highlight ranges

This commit is contained in:
Leander Tentrup 2020-04-17 22:23:23 +02:00
parent 8a4cebafca
commit 2e2c03ee2d
2 changed files with 14 additions and 1 deletions

View file

@ -156,3 +156,15 @@ fn main() {
fs::write(dst_file, &actual_html).unwrap();
assert_eq_text!(expected_html, actual_html);
}
#[test]
fn ranges_sorted() {
let (analysis, file_id) = single_file(
r#"
#[foo(bar = "bar")]
macro_rules! test {}
}"#
.trim(),
);
let _ = analysis.highlight(file_id).unwrap();
}