tests/testthat/test-glue.R

test_that("verify wrapper is functional", {
  expect_equal(as.character(str_glue("a {b}", b = "b")), "a b")

  df <- data.frame(b = "b")
  expect_equal(as.character(str_glue_data(df, "a {b}", b = "b")), "a b")
})

Try the stringr package in your browser

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

stringr documentation built on Sept. 9, 2025, 5:50 p.m.