tests/testthat/test_getSectionContent.R

context("getSectionContent")

f <- findFilesInPackage("markup.Rd", 'wyz.code.rdoc')
g <- findFilesInPackage("empty.Rd", 'wyz.code.rdoc')

test_that("getSectionContent", {
  expect_error(getSectionContent('/tmp/not-a-file.Rd'))
  expect_length(getSectionContent(f[1]), 1L)
  expect_equal(getSectionContent(g[1]), list())
})

Try the wyz.code.rdoc package in your browser

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

wyz.code.rdoc documentation built on Oct. 6, 2021, 9:07 a.m.