tests/testthat/test-dynamic.R

context("dynamic messages")

test_that("handle_dynamic_code", {

  expect_equal(
    handle_dynamic_code("blah"),
    "blah"
  )

  expect_equal(
    handle_dynamic_code("blah `x` borg"),
    substitute(paste0("blah ", x, " borg"))
  )
})

Try the debugme package in your browser

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

debugme documentation built on May 2, 2019, 1:13 p.m.