Skip to content

Commit 5063918

Browse files
Merge pull request #354 from r-lib/indent-eq-formal-tests
- Add tests from #353 (#354).
2 parents 5982e83 + 7b2b8ce commit 5063918

22 files changed

+564
-26
lines changed

tests/testthat/fun_dec/fun_dec_scope_spaces-in.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ a <- function(x, #
1010
{
1111
x
1212
}
13+
14+
function(a =
15+
b,
16+
c) {}
17+
18+
function(a =
19+
b,
20+
c) {
21+
22+
}
23+
24+
function(a =
25+
b,
26+
c
27+
) {}

tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree

Lines changed: 57 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/fun_dec/fun_dec_scope_spaces-out.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ a <- function(x, #
1010
{
1111
x
1212
}
13+
14+
function(a =
15+
b,
16+
c) {}
17+
18+
function(a =
19+
b,
20+
c) {
21+
22+
}
23+
24+
function(a =
25+
b,
26+
c
27+
) {}

tests/testthat/fun_dec/line_break_fun_dec-in.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ a <- function(x, #
1313

1414
a <- function(x, #
1515
y #
16-
) { # FIXME: Move to the same indention level as a
16+
) {
1717
y
1818
}

tests/testthat/fun_dec/line_break_fun_dec-in_tree

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/fun_dec/line_break_fun_dec-out.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ a <- function(x, #
1212

1313
a <- function(x, #
1414
y #
15-
) { # FIXME: Move to the same indention level as a
15+
) {
1616
y
1717
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
abbbb <- function(x =
2+
22
3+
) {
4+
data_frame(
5+
x =
6+
long_long_long * x
7+
)
8+
}

tests/testthat/indention_operators/eq_formal_simple-in_tree

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
abbbb <- function(x =
2+
22) {
3+
data_frame(
4+
x =
5+
long_long_long * x
6+
)
7+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
function(a =
2+
33,
3+
b
4+
) {}
5+
6+
function(a =
7+
33,
8+
b ) {}
9+
10+
function(a ,
11+
b,
12+
c
13+
) {}
14+
15+
function(a,
16+
b,
17+
c) {}
18+
19+
function(ss,
20+
a =
21+
3,
22+
er =
23+
4
24+
) {}
25+
26+
function(a =
27+
b,
28+
f =
29+
d, c =
30+
3, d =
31+
4) {
32+
33+
}

0 commit comments

Comments
 (0)