Update captures in tests

This commit is contained in:
uncenter 2024-12-19 17:07:19 -05:00
parent 8db9743ebb
commit 340f0c1b84
No known key found for this signature in database
4 changed files with 30 additions and 30 deletions

View file

@ -5958,8 +5958,8 @@ async fn test_autoclose_with_embedded_language(cx: &mut gpui::TestAppContext) {
.with_injection_query(
r#"
(script_element
(raw_text) @content
(#set! "language" "javascript"))
(raw_text) @injection.content
(#set! injection.language "javascript"))
"#,
)
.unwrap(),
@ -9065,8 +9065,8 @@ async fn test_toggle_block_comment(cx: &mut gpui::TestAppContext) {
.with_injection_query(
r#"
(script_element
(raw_text) @content
(#set! "language" "javascript"))
(raw_text) @injection.content
(#set! injection.language "javascript"))
"#,
)
.unwrap(),

View file

@ -3103,8 +3103,8 @@ fn html_lang() -> Language {
.with_injection_query(
r#"
(script_element
(raw_text) @content
(#set! "language" "javascript"))
(raw_text) @injection.content
(#set! injection.language "javascript"))
"#,
)
.unwrap()
@ -3126,15 +3126,15 @@ fn erb_lang() -> Language {
.with_injection_query(
r#"
(
(code) @content
(#set! "language" "ruby")
(#set! "combined")
(code) @injection.content
(#set! injection.language "ruby")
(#set! injection.combined)
)
(
(content) @content
(#set! "language" "html")
(#set! "combined")
(content) @injection.content
(#set! injection.language "html")
(#set! injection.combined)
)
"#,
)
@ -3267,10 +3267,10 @@ pub fn markdown_lang() -> Language {
(fenced_code_block
(info_string
(language) @language)
(code_fence_content) @content)
(code_fence_content) @injection.content)
((inline) @content
(#set! "language" "markdown-inline"))
((inline) @injection.content
(#set! injection.language "markdown-inline"))
"#,
)
.unwrap()

View file

@ -1193,15 +1193,15 @@ fn erb_lang() -> Language {
.with_injection_query(
r#"
(
(code) @content
(#set! "language" "ruby")
(#set! "combined")
(code) @injection.content
(#set! injection.language "ruby")
(#set! injection.combined)
)
(
(content) @content
(#set! "language" "html")
(#set! "combined")
(content) @injection.content
(#set! injection.language "html")
(#set! injection.combined)
)
"#,
)
@ -1230,8 +1230,8 @@ fn rust_lang() -> Language {
.with_injection_query(
r#"
(macro_invocation
(token_tree) @content
(#set! "language" "rust"))
(token_tree) @injection.content
(#set! injection.language "rust"))
"#,
)
.unwrap()
@ -1277,13 +1277,13 @@ fn heex_lang() -> Language {
(partial_expression_value)
(expression_value)
(ending_expression_value)
] @content)
(#set! language "elixir")
(#set! combined)
] @injection.content)
(#set! injection.language "elixir")
(#set! injection.combined)
)
((expression (expression_value) @content)
(#set! language "elixir"))
((expression (expression_value) @injection.content)
(#set! injection.language "elixir"))
"#,
)
.unwrap()

View file

@ -5814,8 +5814,8 @@ mod tests {
.with_injection_query(
r#"
(macro_invocation
(token_tree) @content
(#set! "language" "rust"))
(token_tree) @injection.content
(#set! injection.language "rust"))
"#,
)
.unwrap()