test_that("Stripping HTML tags", {
expect_identical(
strip_html_tags("
some text about data
"),
"some text about data"
)
})
# links and references in the package description -------------------------
test_that("references in angle brackets are converted to HTML", {
## URL
expect_identical(
linkify("see ."),
"see <https://CRAN.R-project.org/view=SpatioTemporal>."
)
## DOI
expect_identical(
linkify("M & H (2017) "),
"M & H (2017) <doi:10.1093/biostatistics/kxw051>"
)
## arXiv
expect_identical(
linkify("see ."),
"see <arXiv:1802.03967>."
)
## unsupported formats are left alone (just escaping special characters)
unsupported <- c(
"3.0.CO;2-P>",
""
)
expect_identical(linkify(unsupported), escape_html(unsupported))
})