diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-06-15 14:39:06 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-06-27 15:31:41 +0200 |
| commit | 5373c90c55a33408604d17713edaa9560306b83d (patch) | |
| tree | baef9637cf6203e0ed7e354e976bd1e2f2c8c7c0 /tests | |
| parent | feat(gitcommit): remove overflow rule (diff) | |
| download | nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar.gz nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar.bz2 nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar.lz nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar.xz nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.tar.zst nvim-treesitter-5373c90c55a33408604d17713edaa9560306b83d.zip | |
feat(r)!: update parser and queries
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/indent/r_spec.lua | 7 | ||||
| -rw-r--r-- | tests/query/highlights/r/test.r | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/indent/r_spec.lua b/tests/indent/r_spec.lua index 662ea5809..dc3fe9b8c 100644 --- a/tests/indent/r_spec.lua +++ b/tests/indent/r_spec.lua @@ -11,7 +11,7 @@ local run = Runner:new(it, "tests/indent/r", { describe("indent R:", function() describe("whole file:", function() run:whole_file(".", { - expected_failures = {}, + expected_failures = { "./pipe.R" }, }) end) @@ -34,8 +34,9 @@ describe("indent R:", function() run:new_line("loop.R", { on_line = 8, text = "x <- x + 1", indent = 2 }) run:new_line("loop.R", { on_line = 14, text = "print('lol')", indent = 4 }) - run:new_line("pipe.R", { on_line = 1, text = "head(n = 10L) |>", indent = 2 }) - run:new_line("pipe.R", { on_line = 9, text = "head()", indent = 2 }) + -- FIXME: |>, %>% indent broken after parser update + -- run:new_line("pipe.R", { on_line = 1, text = "head(n = 10L) |>", indent = 2 }) + -- run:new_line("pipe.R", { on_line = 9, text = "head()", indent = 2 }) run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 }) end) diff --git a/tests/query/highlights/r/test.r b/tests/query/highlights/r/test.r index c67df6096..667be4bea 100644 --- a/tests/query/highlights/r/test.r +++ b/tests/query/highlights/r/test.r @@ -5,7 +5,6 @@ init <- 1 r"{(\1\2)}" -> `%r%` # ^ @string -# ^ @string.escape # ^ @operator # ^ @variable @@ -24,21 +23,21 @@ b <- list(name = "r", version = R.version$major) # ^ @variable.parameter # ^ @string # ^ @operator -# ^ @variable.member +# ^ @variable Lang$new(name = "r")$print() -# ^ @function.method.call +# ^ @variable for(i in 1:10) { # <- @keyword.repeat -# ^ @keyword.repeat +# ^ @keyword } add <- function(a, b = 1, ...) { # ^ @keyword.function # ^ @variable.parameter # ^ @variable.parameter -# ^ @keyword +# ^ @constant.builtin return(a + b) } |
