mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
indents(r): fix all R tests
This commit is contained in:
parent
9f25d66f7d
commit
ca06ff0a61
2 changed files with 4 additions and 10 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
[
|
[
|
||||||
(call)
|
|
||||||
(brace_list)
|
(brace_list)
|
||||||
(paren_list)
|
(paren_list)
|
||||||
(special)
|
(special)
|
||||||
|
(pipe)
|
||||||
"|>"
|
"|>"
|
||||||
"if"
|
"if"
|
||||||
"else"
|
"else"
|
||||||
|
|
@ -17,12 +17,7 @@
|
||||||
] @branch
|
] @branch
|
||||||
|
|
||||||
|
|
||||||
(pipe
|
((call) @aligned_indent
|
||||||
(call) @aligned_indent
|
|
||||||
(#set! "delimiter" "()"))
|
|
||||||
|
|
||||||
((special)
|
|
||||||
(call) @aligned_indent
|
|
||||||
(#set! "delimiter" "()"))
|
(#set! "delimiter" "()"))
|
||||||
|
|
||||||
((formal_parameters (identifier)) @aligned_indent
|
((formal_parameters (identifier)) @aligned_indent
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local Runner = require("tests.indent.common").Runner
|
local Runner = require("tests.indent.common").Runner
|
||||||
local XFAIL = require("tests.indent.common").XFAIL
|
--local XFAIL = require("tests.indent.common").XFAIL
|
||||||
|
|
||||||
local run = Runner:new(it, "tests/indent/r", {
|
local run = Runner:new(it, "tests/indent/r", {
|
||||||
tabstop = 2,
|
tabstop = 2,
|
||||||
|
|
@ -12,7 +12,6 @@ describe("indent R:", function()
|
||||||
describe("whole file:", function()
|
describe("whole file:", function()
|
||||||
run:whole_file(".", {
|
run:whole_file(".", {
|
||||||
expected_failures = {
|
expected_failures = {
|
||||||
"r/pipe.R",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
|
@ -35,7 +34,7 @@ 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 = 8, text = "x <- x + 1", indent = 2 })
|
||||||
run:new_line("loop.R", { on_line = 14, text = "print('lol')", indent = 4 })
|
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 }, "expected failure", XFAIL)
|
run:new_line("pipe.R", { on_line = 1, text = "head(n = 10L) |>", indent = 2 })
|
||||||
|
|
||||||
run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 })
|
run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 })
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue