highlighter: Add a test case for Rust nested vec macros

This commit is contained in:
Michael Davis
2025-07-05 10:51:22 -04:00
parent e56dc4b261
commit 67dbeba728
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
vec![vec![]]
// ┡━━┛╿┡━━┛┗━┹─ punctuation.bracket
// │ │╰─ function.macro
// │ ╰─ punctuation.bracket
// ╰─ function.macro

View File

@@ -0,0 +1,4 @@
vec![vec![]]
// ┡━━━┛┡┛╰─ rust
// │ ╰─ rust rust
// ╰─ rust

View File

@@ -446,6 +446,13 @@ fn injection_precedence() {
injection_fixture(&loader, "injections/overlapping_injection.rs");
}
#[test]
fn rust_nested_vec() {
let loader = TestLanguageLoader::new();
highlight_fixture(&loader, "highlighter/nested_vec.rs");
injection_fixture(&loader, "injections/nested_vec.rs");
}
#[test]
fn edit_remove_and_add_injection_layer() {
let loader = TestLanguageLoader::new();