Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("skeletor")
  Loading required package: skeletor
  ── 1. Error: Creating a package skeleton (@test-skeletor-clean.R#11)  ──────────
  cannot open the connection
  1: skeletor("testskeletor", dest) at testthat/test-skeletor-clean.R:11
  2: sapply(c("DESCRIPTION", "Makefile", "NEWS.md", "README.md", ".gitignore", file.path("tests", 
         "testthat.R"), file.path("R", paste0(pkg, ".R"))), readLines, simplify = FALSE)
  3: lapply(X = X, FUN = FUN, ...)
  4: FUN(X[[i]], ...)
  5: file(con, "r")
  
  ── 2. Failure: The right dirs exist (@test-skeletor-clean.R#16)  ───────────────
  dir.exists(...) isn't true.
  
  ── 3. Failure: The right dirs exist (@test-skeletor-clean.R#17)  ───────────────
  dir.exists(...) isn't true.
  
  ── 4. Failure: The right files exist (@test-skeletor-clean.R#21)  ──────────────
  file.exists(...) isn't true.
  
  ── 5. Failure: The right files exist (@test-skeletor-clean.R#22)  ──────────────
  file.exists(...) isn't true.
  
  ── 6. Failure: The right files exist (@test-skeletor-clean.R#23)  ──────────────
  file.exists(...) isn't true.
  
  ── 7. Failure: The right files exist (@test-skeletor-clean.R#24)  ──────────────
  file.exists(...) isn't true.
  
  ── 8. Error: (unknown) (@test-skeletor-clean.R#5)  ─────────────────────────────
  cannot open the connection
  1: public({
         tmpd <- tempdir()
         pkgdir <- tempfile(tmpdir = "")
         pkgdir <- substr(pkgdir, 2, nchar(pkgdir))
         dest <- file.path(tmpd, pkgdir)
         test_that("Creating a package skeleton", {
             skeletor("testskeletor", dest)
             expect_dir_exists(dest)
         })
         test_that("The right dirs exist", {
             expect_dir_exists(file.path(dest, "tests"))
             expect_dir_exists(file.path(dest, "man"))
             expect_dir_exists(file.path(dest, "vignettes"))
         })
         test_that("The right files exist", {
             expect_file_exists(file.path(dest, "DESCRIPTION"))
             expect_file_exists(file.path(dest, ".Rbuildignore"))
             expect_file_exists(file.path(dest, "Makefile"))
             expect_file_exists(file.path(dest, ".gitignore"))
             expect_file_exists(file.path(dest, "R", "testskeletor.R"))
         })
         desc <- readLines(file.path(dest, "DESCRIPTION"))
         tests <- readLines(file.path(dest, "tests", "testthat.R"))
         git <- readLines(file.path(dest, ".gitignore"))
         lisc <- readLines(file.path(dest, "LICENSE"))
         onattach <- readLines(file.path(dest, "R", "testskeletor.R"))
         test_that("The package name appears in the contents", {
             expect_identical(desc[1], "Package: testskeletor")
             expect_identical(tests[2], "test_check(\"testskeletor\")")
             expect_identical(git[4], "testskeletor*.tar.gz")
         })
         test_that("Today's date is set in the DESCRIPTION", {
             expect_identical(desc[11], paste("Date:", Sys.Date()))
         })
         test_that("skeletor.name is empty, so it doesn't get overwritten", {
             expect_identical(lisc[2], "COPYRIGHT HOLDER: yourname")
             expect_true("Author: yourname [aut, cre]" %in% desc)
         })
         test_that("skeletor.github is empty, so it doesn't get overwritten", {
             expect_true("URL: https://github.com/yourgithub/testskeletor" %in% desc)
         })
         test_that("skeletor.email is empty, so it doesn't get overwritten", {
             expect_true("Maintainer: yourname <youremail@example.com>" %in% desc)
         })
         test_that("The .onAttach function in the R file points to testskeletor", {
             expect_true(".onAttach <- function (lib, pkgname=\"testskeletor\") {" %in% 
                 onattach)
         })
         if (!no.check) {
             setwd(tmpd)
             test_that("The skeleton package can be built", {
                 Rcmd(paste("build", pkgdir))
                 expect_file_exists("testskeletor_0.1.0.tar.gz")
             })
             test_that("The built package passes R CMD CHECK", {
                 skip_on_appveyor()
                 skip_on_cran()
                 status <- Rcmd("check testskeletor_0.1.0.tar.gz")
                 expect_equal(status, 0)
             })
         }
     }) at testthat/test-skeletor-clean.R:5
  2: with(globalenv(), ...) at /home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/skeletor.Rcheck/tests/testthat/helper.R:9
  3: with.default(globalenv(), ...)
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: eval(substitute(expr), data, enclos = parent.frame())
  6: readLines(file.path(dest, ".gitignore")) at testthat/test-skeletor-clean.R:29
  7: file(con, "r")
  
  ── 9. Error: Creating a package skeleton (@test-skeletor-conf.R#13)  ───────────
  cannot open the connection
  1: skeletor("testskeletor", dest) at testthat/test-skeletor-conf.R:13
  2: sapply(c("DESCRIPTION", "Makefile", "NEWS.md", "README.md", ".gitignore", file.path("tests", 
         "testthat.R"), file.path("R", paste0(pkg, ".R"))), readLines, simplify = FALSE)
  3: lapply(X = X, FUN = FUN, ...)
  4: FUN(X[[i]], ...)
  5: file(con, "r")
  
  ── 10. Failure: The right dirs exist (@test-skeletor-conf.R#18)  ───────────────
  dir.exists(...) isn't true.
  
  ── 11. Failure: The right dirs exist (@test-skeletor-conf.R#19)  ───────────────
  dir.exists(...) isn't true.
  
  ── 12. Failure: The right files exist (@test-skeletor-conf.R#23)  ──────────────
  file.exists(...) isn't true.
  
  ── 13. Failure: The right files exist (@test-skeletor-conf.R#24)  ──────────────
  file.exists(...) isn't true.
  
  ── 14. Failure: The right files exist (@test-skeletor-conf.R#25)  ──────────────
  file.exists(...) isn't true.
  
  ── 15. Failure: The right files exist (@test-skeletor-conf.R#26)  ──────────────
  file.exists(...) isn't true.
  
  ── 16. Error: (unknown) (@test-skeletor-conf.R#7)  ─────────────────────────────
  cannot open the connection
  1: public({
         tmpd <- tempdir()
         pkgdir <- tempfile(tmpdir = "")
         pkgdir <- substr(pkgdir, 2, nchar(pkgdir))
         dest <- file.path(tmpd, pkgdir)
         test_that("Creating a package skeleton", {
             skeletor("testskeletor", dest)
             expect_dir_exists(dest)
         })
         test_that("The right dirs exist", {
             expect_dir_exists(file.path(dest, "tests"))
             expect_dir_exists(file.path(dest, "man"))
             expect_dir_exists(file.path(dest, "vignettes"))
         })
         test_that("The right files exist", {
             expect_file_exists(file.path(dest, "DESCRIPTION"))
             expect_file_exists(file.path(dest, ".Rbuildignore"))
             expect_file_exists(file.path(dest, "Makefile"))
             expect_file_exists(file.path(dest, ".gitignore"))
             expect_file_exists(file.path(dest, "R", "testskeletor.R"))
         })
         desc <- readLines(file.path(dest, "DESCRIPTION"))
         tests <- readLines(file.path(dest, "tests", "testthat.R"))
         git <- readLines(file.path(dest, ".gitignore"))
         lisc <- readLines(file.path(dest, "LICENSE"))
         readme <- readLines(file.path(dest, "README.md"))
         test_that("The package name appears in the contents", {
             expect_identical(desc[1], "Package: testskeletor")
             expect_identical(tests[2], "test_check(\"testskeletor\")")
             expect_identical(git[4], "testskeletor*.tar.gz")
         })
         test_that("Today's date is set in the DESCRIPTION", {
             expect_identical(desc[11], paste("Date:", Sys.Date()))
         })
         test_that("skeletor.name appears in the right places", {
             expect_identical(lisc[2], "COPYRIGHT HOLDER: Neal Richardson")
             expect_true("Author: Neal Richardson [aut, cre]" %in% desc)
         })
         test_that("skeletor.github appears in the right places", {
             expect_true("URL: https://github.com/nealrichardson/testskeletor" %in% desc)
         })
         test_that("skeletor.email appears in the right place", {
             expect_true("Maintainer: Neal Richardson <neal.p.richardson@gmail.com>" %in% 
                 desc)
         })
         test_that("The travis/codecov badge links get updated", {
             u <- "https://travis-ci.org/nealrichardson/testskeletor.png?branch=master"
             expect_true(any(grepl(u, readme, fixed = TRUE)))
         })
         test_that("The appveyor link gets updated", {
             u <- "https://ci.appveyor.com/project/nealrichardson/testskeletor/settings/badges"
             expect_true(any(grepl(u, readme, fixed = TRUE)))
         })
         test_that("Authors@R gets set correctly if you give a name and email", {
             expect_true("Authors@R: person(\"Neal\", \"Richardson\", role=c(\"aut\", \"cre\"), email=\"neal.p.richardson@gmail.com\")" %in% 
                 desc)
         })
         if (!no.check) {
             setwd(tmpd)
             test_that("The skeleton package can be built", {
                 Rcmd(paste("build", pkgdir))
                 expect_file_exists("testskeletor_0.1.0.tar.gz")
             })
             test_that("The built package passes R CMD CHECK", {
                 skip_on_appveyor()
                 skip_on_cran()
                 status <- Rcmd("check testskeletor_0.1.0.tar.gz")
                 expect_equal(status, 0)
             })
         }
     }) at testthat/test-skeletor-conf.R:7
  2: with(globalenv(), ...) at /home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/skeletor.Rcheck/tests/testthat/helper.R:9
  3: with.default(globalenv(), ...)
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: eval(substitute(expr), data, enclos = parent.frame())
  6: readLines(file.path(dest, ".gitignore")) at testthat/test-skeletor-conf.R:31
  7: file(con, "r")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 34 SKIPPED: 0 FAILED: 16
  1. Error: Creating a package skeleton (@test-skeletor-clean.R#11) 
  2. Failure: The right dirs exist (@test-skeletor-clean.R#16) 
  3. Failure: The right dirs exist (@test-skeletor-clean.R#17) 
  4. Failure: The right files exist (@test-skeletor-clean.R#21) 
  5. Failure: The right files exist (@test-skeletor-clean.R#22) 
  6. Failure: The right files exist (@test-skeletor-clean.R#23) 
  7. Failure: The right files exist (@test-skeletor-clean.R#24) 
  8. Error: (unknown) (@test-skeletor-clean.R#5) 
  9. Error: Creating a package skeleton (@test-skeletor-conf.R#13) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/Rinstignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/NAMESPACE': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/LICENSE': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/elifekaM': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/appveyor.yml': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/README.md': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/NEWS.md': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/travis.yml': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/DESCRIPTION': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/gitignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/R/yourpackagename.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/Rbuildignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/tests/testthat/test-something.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/tests/testthat/helper.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad5377af9c0/tests/testthat.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/Rinstignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/NAMESPACE': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/LICENSE': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/elifekaM': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/appveyor.yml': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/README.md': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/NEWS.md': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/travis.yml': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/DESCRIPTION': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/gitignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/R/yourpackagename.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/Rbuildignore': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/tests/testthat/test-something.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/tests/testthat/helper.R': Permission denied
  rm: cannot remove '/tmp/RtmpLSpdQi/file6ad522460277/tests/testthat.R': Permission denied