Skip to content

Commit 3b84c6c

Browse files
add tests
1 parent 8c0f707 commit 3b84c6c

File tree

4 files changed

+162
-0
lines changed

4 files changed

+162
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
call(3,
2+
b = 2, c
3+
)
4+
5+
gs(3, b = 2,
6+
c)
7+
8+
call(3, b = 2, c)
9+
10+
map(data, fun,
11+
x = 3, z = 33)
12+
13+
map2(dat1, data2, fun, x, y,
14+
z)
15+
16+
map2(dat1, data2, fun, x = 1, y = 2,
17+
z
18+
)

tests/testthat/line_breaks_fun_call/named_arguments-in_tree

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
call(3,
2+
b = 2, c
3+
)
4+
5+
gs(3,
6+
b = 2,
7+
c
8+
)
9+
10+
call(3, b = 2, c)
11+
12+
map(data, fun,
13+
x = 3, z = 33
14+
)
15+
16+
map2(
17+
dat1, data2, fun, x, y,
18+
z
19+
)
20+
21+
map2(dat1, data2, fun,
22+
x = 1, y = 2,
23+
z
24+
)

tests/testthat/test-line_breaks_fun_call.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ test_that("line breaks work with exceptions", {
2929
"switch_ifelse",
3030
transformer = style_text), NA)
3131
})
32+
33+
test_that("line breaks work with exceptions", {
34+
expect_warning(test_collection("line_breaks_fun_call",
35+
"named_arguments",
36+
transformer = style_text), NA)
37+
})

0 commit comments

Comments
 (0)