tests/testthat/test-raw.R

test_that("multiplication works", {
  expect_identical(raw_deparse_str(raw()), "")
  expect_identical(raw_deparse_str(charToRaw("string")), "737472696e67")
  expect_identical(
    raw_deparse_str(raw(10), prefix = "'0x", suffix = "'"),
    "'0x00000000000000000000'"
  )
})

Try the rlang package in your browser

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

rlang documentation built on April 12, 2025, 1:13 a.m.