Skip to content

Commit

Permalink
de-lint test-unneeded_concatenation_linter.R
Browse files Browse the repository at this point in the history
  • Loading branch information
AshesITR committed Dec 6, 2020
1 parent 92a9fe0 commit 64a13fb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/testthat/test-unneeded_concatenation_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ test_that("returns the correct linting", {

expect_lint("c(x)", NULL, linter)
expect_lint("c(1, 2)", NULL, linter)
expect_lint("c(x, recursive=TRUE)", NULL, linter)
expect_lint("c(1, recursive=FALSE)", NULL, linter)
expect_lint("c(x, recursive = TRUE)", NULL, linter)
expect_lint("c(1, recursive = FALSE)", NULL, linter)
expect_lint("lapply(1, c)", NULL, linter)

expect_lint("c()", list(message=msg_e, line_number=1L, column_number=1L), linter)
expect_lint("c(NULL)", list(message=msg_c, line_number=1L, column_number=1L), linter)
expect_lint("c(1)", list(message=msg_c, line_number=1L, column_number=1L), linter)
expect_lint("c (\n'a' )", list(message=msg_c, line_number=1L, column_number=1L), linter)
expect_lint("c()", list(message = msg_e, line_number = 1L, column_number = 1L), linter)
expect_lint("c(NULL)", list(message = msg_c, line_number = 1L, column_number = 1L), linter)
expect_lint("c(1)", list(message = msg_c, line_number = 1L, column_number = 1L), linter)
expect_lint("c (\n'a' )", list(message = msg_c, line_number = 1L, column_number = 1L), linter)
expect_lint("c(y, c('c('),\nc())",
list(
list(message=msg_c, line_number=1L, column_number=6L),
list(message=msg_e, line_number=2L, column_number=1L)
list(message = msg_c, line_number = 1L, column_number = 6L),
list(message = msg_e, line_number = 2L, column_number = 1L)
),
linter)
})

0 comments on commit 64a13fb

Please sign in to comment.