tests/testthat/test-examples.R

test_that("all exported functions have examples", {
  exFiles <- normalizePath(dir("../../man", full.names = TRUE))
  testInit()
  exFiles <- exFiles[!dir.exists(exFiles)]
  # use for loop as it keeps control at top level
  for (file in exFiles) {
    print(file)
    test_example(file)
  }
})

Try the SpaDES.tools package in your browser

Any scripts or data that you put into this service are public.

SpaDES.tools documentation built on Nov. 11, 2023, 1:07 a.m.