tests/testthat/test-str_englue.R

g <- function(var) str_englue("{{ var }}")


test_that("str_englue() automatically inserts a given variable name using a glue operator {{}}", {
  expect_equal(g(cyl), "cyl")
})

Try the forstringr package in your browser

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

forstringr documentation built on Aug. 7, 2023, 5:08 p.m.