mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Update captures in tests
This commit is contained in:
parent
8db9743ebb
commit
340f0c1b84
4 changed files with 30 additions and 30 deletions
|
@ -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(),
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue