Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Jan 8, 2023
1 parent 29b8ebf commit 537b3f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/test-use_lintr.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ test_that("use_lintr with type = full also works", {
lints <- lint_dir(tmp)
expect_length(lints, 0L)
})

test_that("use_lintr add .lintr to .Rbuildignore for packages", {
tmp <- withr::local_tempdir()
usethis::create_package(tmp)
setwd(tmp)
lintr_file <- use_lintr()
expect_true(file.exists(lintr_file))
expect_true("^\\.lintr$" %in% readLines(".Rbuildignore"))
})

0 comments on commit 537b3f0

Please sign in to comment.