tests/testthat/test-fig.R

test_that("Test Reading", {
  expect_error(
    # fail while reading in rubbish link
    fig("brokenlink"),
    {
      "No such file or directory"
    }
  )
  expect_silent({
    # read in without trouble
    temp <- fig(
      system.file("extdata", "fig.png", package = "figpatch", mustWork = TRUE)
    )
  })
})

Try the figpatch package in your browser

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

figpatch documentation built on May 3, 2022, 9:07 a.m.