title: "dev_history.Rmd empty" author: "Sébastien Rochette" date: "23/01/2021" output: html_document editor_options: chunk_output_type: console


library(testthat)
# Load already included functions
pkgload::load_all(export_all = FALSE)

My function

#' Check that my package dont write in the user's home filespace, package directory and getwd().
#' @inheritParams get_notes
#' @params check_output the directory in which the package was checked (if realised already) 

check_write_users <- function(path = ".", checks, check_output, ...) {
  if (missing(check_output)) {
    check_output <- tempfile("check")
    dir.create(check_output)
    checks <- rcmdcheck(path = path, ...)
  }

  # Take
  local <- utils::fileSnapshot (check_output, timestamp = tempfile("timestamp"), md5sum = TRUE)
}

test_that("my_function works properly", {

})
# Run but keep eval=FALSE to avoid infinite loop
# Execute in the console directly
fusen::inflate(rmd = "dev/dev_history.Rmd")


ThinkR-open/checkhelper documentation built on Jan. 26, 2024, 4:16 p.m.