tests/testthat/test-pdf_to_images.R

testthat::context("PDF conversion")

testthat::test_that("PDF converted to Ari", {

  skip_on_cran()

  ex_file = system.file("extdata", "example.pdf", package = "ariExtra")
  if (file.exists(ex_file)) {
    res = pdf_to_ari(ex_file, script = c("hey", "ho"), open = FALSE)
    res = res$output_file
    testthat::expect_length(res, 1)
    testthat::expect_true(file.exists(res))
    testthat::expect_type(res, "character")
  }
})

Try the ariExtra package in your browser

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

ariExtra documentation built on June 23, 2021, 9:07 a.m.