Skip to content

Commit 7134146

Browse files
fix test, bundle it with call test
1 parent ec4e22a commit 7134146

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/testthat/test-object_usage_linter.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,6 @@ test_that("interprets glue expressions", {
370370
}
371371
"), NULL, linter)
372372

373-
expect_lint(trim_some("
374-
foo <- function() {
375-
`%++%` <- `+`
376-
glue('{x %++% y}')
377-
}
378-
"), NULL, linter)
379-
380373
# multiple variables in single interpolation
381374
expect_lint(trim_some("
382375
fun <- function() {
@@ -439,6 +432,15 @@ test_that("interprets glue expressions", {
439432
"local_unused_call",
440433
linter
441434
)
435+
436+
# ditto infix operator
437+
expect_lint(trim_some("
438+
glue <- glue::glue # imitate this being an @import
439+
foo <- function() {
440+
`%++%` <- `+`
441+
glue('{x %++% y}')
442+
}
443+
"), NULL, linter)
442444
})
443445

444446
test_that("errors/edge cases in glue syntax don't fail lint()", {

0 commit comments

Comments
 (0)