tests/testthat/test-plot-png.R

test_that("plotPNG()/startPNG() ignores NULL dimensions", {
  f <- plotPNG(function() plot(1), width = NULL, height = NULL)
  on.exit(unlink(f))
  bits <- readBin(f, "raw", file.info(f)$size)
  expect_true(length(bits) > 0)
})

Try the shiny package in your browser

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

shiny documentation built on Nov. 18, 2023, 1:08 a.m.