Skip to content

Commit 537b3f0

Browse files
committed
add test
1 parent 29b8ebf commit 537b3f0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/testthat/test-use_lintr.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ test_that("use_lintr with type = full also works", {
3535
lints <- lint_dir(tmp)
3636
expect_length(lints, 0L)
3737
})
38+
39+
test_that("use_lintr add .lintr to .Rbuildignore for packages", {
40+
tmp <- withr::local_tempdir()
41+
usethis::create_package(tmp)
42+
setwd(tmp)
43+
lintr_file <- use_lintr()
44+
expect_true(file.exists(lintr_file))
45+
expect_true("^\\.lintr$" %in% readLines(".Rbuildignore"))
46+
})

0 commit comments

Comments
 (0)