Skip to content

Commit 01256e7

Browse files
adapt tests
1 parent 2ed63fa commit 01256e7

19 files changed

+196
-112
lines changed

R/rules-line_break.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ add_line_break_after_pipe <- function(pd) {
5252

5353
#' Set line break for multi-line function calls
5454
#' @param pd A parse table.
55-
#' @param except_token A character vector with tokens before "'('" that do not
55+
#' @param except A character vector with tokens before "'('" that do not
5656
#' @name set_line_break_if_call_is_multi_line
5757
#' @importFrom rlang seq2
5858
NULL

man/set_line_break_if_call_is_multi_line.Rd

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

man/set_space_between_eq_sub_and_comma.Rd

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

tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
b<-function(x ){
22
x <- c(1,
33
2+ 3,
4-
sin(pi) ) # FIXME add tidyverse-comliant rule to break after '('
4+
sin(pi) )
55

66
if(x > 10){
77
return("done")

tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree

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

tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-out.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
b <- function(x) {
2-
x <- c(1,
3-
2 + 3,
4-
sin(pi)) # FIXME add tidyverse-comliant rule to break after '('
2+
x <- c(
3+
1,
4+
2 + 3,
5+
sin(pi)
6+
)
57

68
if (x > 10) {
79
return("done")

tests/testthat/indention_multiple/curly_and_round-out.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ test_that("this is a text", {
66
{
77
call(
88
12, 1 + 1,
9-
26)
9+
26
10+
)
1011
}
1112
}))
1213

tests/testthat/indention_multiple/edge_mixed-out.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
(({
44
{
55
{
6-
c(99,
6+
c(
7+
99,
78
1 + 1, {
89
"within that suff"
9-
})
10+
}
11+
)
1012
}
1113
}
1214
}))

tests/testthat/indention_multiple/overall-out.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ a <- function(x) {
2020
26 ^ 2, # FIXME ^ operator has to be surrounded by one space (or none?!), never multiple
2121
8,
2222
7
23-
)))
23+
))
24+
)
2425

2526
call(
2627
1, 2,
2728
23 + Inf - 99, call(
2829
16
29-
))
30+
)
31+
)
3032
}
3133
# comments everywhere
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
c(call(2), 1, # choosed first function name (c) such that indention is 2.
1+
c(call(2), 1, # comment
22
29
33
)

0 commit comments

Comments
 (0)