tests/testthat/test-encode-decode.R

context("encoding")

test_that("R objects can be encoded, decoded", {
  data <- list(a = 1L, b = 2L, c = "3")
  encoded <- base64_encode_object(data)
  decoded <- base64_decode_object(encoded)
  expect_equal(data, decoded)
})

Try the rmarkdown package in your browser

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

rmarkdown documentation built on Nov. 4, 2024, 5:06 p.m.