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)
  }
})
PredictiveEcology/SpaDES.tools documentation built on April 18, 2024, 3:21 a.m.