tests/testthat/test-output-table-format.R

test_that("save an autoslider output", {
  output <- t_dm_slide(adsl = testdata$adsl) %>%
    decorate(title = "test title", footnote = "") %>%
    list()

  outfile <- paste0(tempdir(), "/output.pptx")
  testthat::expect_no_error(
    generate_slides(
      output,
      outfile = outfile,
      table_format = autoslider_format
    )
  )

  testthat::expect_no_error(
    generate_slides(
      output,
      outfile = outfile,
      template = outfile,
      table_format = blue_format
    )
  )

  testthat::expect_no_error(
    generate_slides(
      output,
      outfile = outfile,
      template = outfile,
      table_format = orange_format
    )
  )

  testthat::expect_no_error(
    generate_slides(
      output,
      outfile = outfile,
      template = outfile,
      table_format = red_format
    )
  )

  testthat::expect_no_error(
    generate_slides(
      output,
      outfile = outfile,
      template = outfile,
      table_format = purple_format
    )
  )
})

Try the autoslider.core package in your browser

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

autoslider.core documentation built on April 4, 2025, 2:05 a.m.