aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/r_spec.lua
diff options
context:
space:
mode:
authorPedro Castro <aspeddro@gmail.com>2022-01-29 10:36:50 -0300
committerStephan Seitz <stephan.seitz@fau.de>2022-01-29 15:25:56 +0100
commit3606f8efbb6d02f78336965ae5c59614e39c9ebf (patch)
tree7da0d472453b9226d3ea1f4638b4ca4f25f23e93 /tests/indent/r_spec.lua
parentindents(r): add tests runner (diff)
downloadnvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar.gz
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar.bz2
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar.lz
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar.xz
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.tar.zst
nvim-treesitter-3606f8efbb6d02f78336965ae5c59614e39c9ebf.zip
indents(r): add pipe test
Diffstat (limited to 'tests/indent/r_spec.lua')
-rw-r--r--tests/indent/r_spec.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/indent/r_spec.lua b/tests/indent/r_spec.lua
index 1bf6a2b50..20454df7c 100644
--- a/tests/indent/r_spec.lua
+++ b/tests/indent/r_spec.lua
@@ -1,4 +1,5 @@
local Runner = require("tests.indent.common").Runner
+local XFAIL = require("tests.indent.common").XFAIL
local run = Runner:new(it, "tests/indent/r", {
tabstop = 2,
@@ -9,7 +10,11 @@ local run = Runner:new(it, "tests/indent/r", {
describe("indent R:", function()
describe("whole file:", function()
- run:whole_file "."
+ run:whole_file(".", {
+ expected_failures = {
+ "r/pipe.R",
+ },
+ })
end)
describe("new line:", function()
@@ -30,6 +35,8 @@ 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 }, "expected failure", XFAIL)
+
run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 })
end)
end)