From 161576dde2a2172c6036e25600185e9497e71a24 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Tue, 29 Nov 2022 11:52:28 -0300 Subject: indents(r): support special operator Close #3879 --- tests/indent/r/pipe.R | 3 +++ tests/indent/r_spec.lua | 1 + 2 files changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/indent/r/pipe.R b/tests/indent/r/pipe.R index 2eef84218..6e19f8215 100644 --- a/tests/indent/r/pipe.R +++ b/tests/indent/r/pipe.R @@ -5,3 +5,6 @@ mtcars |> subset( cyl > 3 ) + +mtcars %>% + head() diff --git a/tests/indent/r_spec.lua b/tests/indent/r_spec.lua index ac1ed31e3..662ea5809 100644 --- a/tests/indent/r_spec.lua +++ b/tests/indent/r_spec.lua @@ -35,6 +35,7 @@ describe("indent R:", function() 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 }) run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 }) end) -- cgit v1.2.3-70-g09d2