tests/testthat/test_generateOptionLink.R

context("generateOptionLink")

l <- generateOptionLink('my.package', 'entry')

test_that("generateOptionLink", {
  expect_length(l, 1L)
  expect_equal(l, "\\link[my.package]{entry}")
})

p <- producePackageLink('my.package', 'entry')

test_that("generateOptionLink", {
  expect_length(p, 1L)
  expect_equal(p, "\\link[my.package:entry]{my.package:entry}")
})


s <- generateOptionSexpr('echo=TRUE', 'x <- 1')

test_that("generateOptionSexpr", {
  expect_length(s, 1L)
  expect_equal(s, "\\Sexpr[echo=TRUE]{x <- 1}")
})

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.