Skip to content

Commit e69ced6

Browse files
test previously offending case.
1 parent 480a461 commit e69ced6

File tree

4 files changed

+226
-0
lines changed

4 files changed

+226
-0
lines changed

tests/testthat/test-token_adding_removing.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ test_that("double braces are treated correctly", {
1717
expect_warning(test_collection("token_adding_removing", "double_braces",
1818
transformer = style_text), NA)
1919
})
20+
21+
test_that("double braces are treated correctly", {
22+
expect_warning(test_collection("token_adding_removing", "token_creation_find_pos",
23+
transformer = style_text), NA)
24+
})
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
print_out <- function(x, ...) {
3+
lines <- m(y, ..., print = TRUE)
4+
paste(lines, sep = "\n")
5+
}
6+
7+
# No comment
8+
9+
kng <- function(x, y) spm(fmt = "%i", lgd(x), tds(y))
10+
tka <- function(my, y) ttt(gmks = "%s", slice(x), acast(d))
11+
12+
another <- function(x, y) {
13+
if (!fun(x) && !not_is(y)) {
14+
return(s)
15+
}
16+
identical(kss(nmp), gsk(rdm))
17+
}

tests/testthat/token_adding_removing/token_creation_find_pos-in_tree

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
print_out <- function(x, ...) {
3+
lines <- m(y, ..., print = TRUE)
4+
paste(lines, sep = "\n")
5+
}
6+
7+
# No comment
8+
9+
kng <- function(x, y) spm(fmt = "%i", lgd(x), tds(y))
10+
tka <- function(my, y) ttt(gmks = "%s", slice(x), acast(d))
11+
12+
another <- function(x, y) {
13+
if (!fun(x) && !not_is(y)) {
14+
return(s)
15+
}
16+
identical(kss(nmp), gsk(rdm))
17+
}

0 commit comments

Comments
 (0)