dwww Home | Show directory contents | Find package

context("printToChar")

test_that("printToChar", {
  if (!interactive()) {
  z = list()
  class(z) = "foo"
  print.foo <<- function(x, ...) catf("bar")
  s = printToChar(z)
  expect_equal(s, "bar")
  print.foo <<- function(x, ...) catf("bar\nblubb")
  s = printToChar(z)
  expect_equal(s, "bar\nblubb")
  }
})

Generated by dwww version 1.15 on Sat May 18 13:53:38 CEST 2024.