tests/testthat/test_retrievePackageFunctionNames.R

context("retrievePackageExportedFunctionNames")

pn <- c('base', 'utils', 'crayon', 'wyz.code.offensiveProgramming')

r <- lapply(pn, function(e) {
  guardExecution(retrievePackageFunctionNames(e))
})

test_that("retrievePackageExportedFunctionNames", {

  expect_error(retrievePackageFunctionNames('translation'))

  mtf <- function(k) {
      expect_true(length(r[[!!k]]) > 0)
  }

  sapply(seq_len(length(pn)), mtf)
})

Try the wyz.code.offensiveProgramming package in your browser

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

wyz.code.offensiveProgramming documentation built on Sept. 25, 2023, 9:05 a.m.