File: test-citation.R

package info (click to toggle)
r-cran-xfun 0.51%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,044 kB
  • sloc: ansic: 242; sh: 22; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
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)
})