Skip to content

Commit

Permalink
add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 20, 2024
1 parent 0f9cca9 commit 7525889
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/indention_multiple/overall-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a <- function(x) {
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/indention_multiple/overall-out.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a <- function(x) {
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ fun( s = g(x),
gg = a(n == 2) |> b(),
tt |> q(r = 3))

# FIXME closing brace could go on ntext line. Alternative: remove lin breaks completely.
blew(x |>

c(), y = 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ fun(
tt |> q(r = 3)
)

# FIXME closing brace could go on ntext line. Alternative: remove lin breaks completely.
blew(
x |>
c(),
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/line_breaks_and_other/pipe-line-breaks-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ fun( s = g(x),
gg = a(n == 2) %>% b,
tt %>% q(r = 3))

# FIXME closing brace could go on ntext line. Alternative: remove lin breaks completely.
blew(x %>%

c(), y = 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ fun(
tt %>% q(r = 3)
)

# FIXME closing brace could go on ntext line. Alternative: remove lin breaks completely.
blew(
x %>%
c(),
Expand Down
18 changes: 18 additions & 0 deletions tests/testthat/line_breaks_fun_call/named_arguments-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,21 @@ map2(dat1, data2, fun, x, y,
map2(dat1, data2, fun, x = 1, y = 2,
z
)

c(
x, y,
c(
'b'
), m, n, fun(f = 2
# comment-2
)
)
# comment-1
c(
c(
'b'
), fun(
f = 2
), e, f,
g
)
22 changes: 22 additions & 0 deletions tests/testthat/line_breaks_fun_call/named_arguments-out.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,25 @@ map2(dat1, data2, fun,
x = 1, y = 2,
z
)

c(
x, y,
c(
"b"
),
m, n, fun(
f = 2
# comment-2
)
)
# comment-1
c(
c(
"b"
),
fun(
f = 2
),
e, f,
g
)
2 changes: 1 addition & 1 deletion tests/testthat/scope-AsIs/scope_none-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a<- function(x){
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
} )
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/scope-AsIs/scope_none-out.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a<- function(x){
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
} )
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/scope-character/scope_none-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a<- function(x){
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
} )
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/scope-character/scope_none-out.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a<- function(x){
))
if (x > 10) {
for (x in 22) { # FIXME in operator only to be surrounded by one space. What about %in%?
prin(x)
print(x)
}
}
} )
Expand Down

0 comments on commit 7525889

Please sign in to comment.