tests/testthat/test-preamble.R

test_that("Preamble from file", {
  file <- system.file("bib/xampl_preamble.bib", package = "bibtex")

  out <- read.bib(file)
  class(out) <- c("citation", "bibentry")
  expect_snapshot_output(out)
})


test_that("Preamble via params", {
  file <- system.file("bib/xampl_single.bib", package = "bibtex")

  out <- read.bib(file)
  expect_snapshot_output(toBibtex(out))
})

Try the bibtex package in your browser

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

bibtex documentation built on Feb. 16, 2023, 8:26 p.m.