tests/test-cran/test-citation.R

library(testit)

pkgs = c('KernSmooth', 'xfun', 'knitr')
pkg_bib(pkgs, tempfile(), tweak = FALSE)

assert('& is escaped in title when pkg_bib(tweak = TRUE)', {
  (length(grep(' & ', grep(
    '^\\s*title =', capture.output(pkg_bib(pkgs, tweak = TRUE)), value = TRUE
  ))) %==% 0L)
})

Try the xfun package in your browser

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

xfun documentation built on April 3, 2025, 7:04 p.m.