tests/testthat/test-roxytest-testexamples-read_bib2dt.R

# 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")
})

Try the journalabbr package in your browser

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

journalabbr documentation built on Aug. 9, 2022, 5:05 p.m.