tests/testthat/test-print.R

testthat::context('print')

testthat::describe('print clipr',{
  testthat::skip_on_ci()
  skip_if_no_clipboard()

  it('clipr',{

    print(details::details('test',output = 'clipr'))

    testthat::expect_equal(
      unlist(strsplit(bench_fun2('test'), '\\n')),
      clipr::read_clip()
    )
  })
})

testthat::describe('print methods',{
  it('console',{
    testthat::expect_output(
      print(details::details('test')),
      regexp = bench_fun('test')
    )    
  })
  
  it('character',{
    testthat::expect_equal(
      unlist(strsplit(bench_fun('test'),'\\n')),
      print(details::details('test',output = 'character'))
    )    
  })
  
})

Try the details package in your browser

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

details documentation built on April 4, 2025, 1:44 a.m.