tests/testthat/test-util.R

test_that("facet class name to labels", {
  expect_equal(facet_names_to_labels(c("ParameterFacet","InputVariableFacet")), c("parameter", "input variable"))
})

test_that("string interpolation", {
  x <- "test"
  expect_equal(interp("this is a {x}"), "this is a test")
  entries <- 1:3
  expect_equal(interp("{length(entries)} {?entry/entries}: {entries}"), "3 entries: 1, 2, and 3")
})

Try the assemblerr package in your browser

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

assemblerr documentation built on Jan. 13, 2022, 1:07 a.m.