tests/testthat/test-independent-testing-rtf_read_figure.R

test_that("Test fig_format attribute", {
  a <- rtf_read_figure(c("fig/fig3.jpeg", "fig/fig2.png", "fig/fig4.emf"))

  expect_equal(sum(attr(a, "fig_format") == c("jpeg", "png", "emf")), 3)
})

test_that("Test outputs", {
  a <- rtf_read_figure(c("fig/fig3.jpeg", "fig/fig2.png", "fig/fig4.emf")) |>
    rtf_figure() |>
    rtf_encode(doc_type = "figure")

  expect_snapshot_output(a)
})
Merck/r2rtf documentation built on April 18, 2024, 11:51 a.m.