# Generated by roxytest: Do not edit by hand!
context("File R/read_bib2dt.R: @testexamples")
test_that("Function read_bib2dt() @ L29", {
# Read from .bib file:
file1 <- system.file("extdata", "testfile_1.bib", package = "journalabbr", mustWork = TRUE)
dt1 <- read_bib2dt(file1)
colnames(dt1)
file2 <- system.file("extdata", "testfile_2.bib", package = "journalabbr", mustWork = TRUE)
dt2 <- read_bib2dt(file2)
colnames(dt2)
expect_true(is.data.table(dt1))
expect_true(is.data.table(dt2))
expect_warning(read_bib2dt(file1),"Duplicate key in uploaded Bib file")
expect_warning(read_bib2dt(file1),"NA value exists in Citation Key, please check the bib file")
expect_warning(read_bib2dt(file2),"Duplicate key in uploaded Bib file")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.