swh:1:snp:bdc19e867479541d0f4994ceaa711217d0dc28ed
Tip revision: 1ad2332a4119217014f512bdf05025fa6f2bb72f authored by Hadley Wickham on 09 April 2020, 13:00:02 UTC
version 1.5.1
version 1.5.1
Tip revision: 1ad2332
test-utils.R
context("test-utils.R")
test_that("find_reexport_source", {
ns <- asNamespace("pkgdown")
expect_equal(
find_reexport_source(rlang::ns_env_name, ns, "ns_env_name"),
"rlang"
)
})
test_that("find_reexport_source_from_imports", {
ns <- asNamespace("pkgdown")
expect_equal(
find_reexport_source_from_imports(ns, "ns_env_name"),
"rlang"
)
})
test_that("pkgdown.internet can be set and read", {
options(pkgdown.internet = FALSE)
expect_false(has_internet())
})
test_that("cran_unquote works", {
expect_equal(cran_unquote("Quoting is CRAN's thing."),
"Quoting is CRAN's thing.")
expect_equal(cran_unquote("'R-hub' is great!"),
"R-hub is great!")
expect_equal(cran_unquote("From 'README' to 'html' with 'pkgdown'"),
"From README to html with pkgdown")
})