test_that("bib writer works", {
skip_if_not(has_bbt())
file <- tempfile(fileext = ".bib")
expect_identical(
bbt_write_bib(file, "dunnington_etal18"),
file
)
expect_error(
bbt_write_bib(file, "dunnington_etal18"),
"overwrite"
)
expect_identical(
bbt_write_bib(file, "dunnington_etal18", overwrite = TRUE),
file
)
unlink(file)
})
test_that("bib guessers work", {
expect_identical(bbt_guess_translator("thing.bib"), "biblatex")
expect_identical(bbt_guess_translator("thing.json"), "json")
expect_identical(bbt_guess_translator("thing.yaml"), "yaml")
expect_identical(bbt_guess_format("thing.tex"), "cite")
expect_identical(bbt_guess_format("thing.Rmd"), "pandoc")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.