tests/testthat/helper.R

library(testthat)
library(checkmate)

rand = function(n, min = 5L, max = 50L, only.ascii = FALSE) {
  chars = c(letters, LETTERS, c("=", "+", "-", "_", "/", "&", "=", "?", ":", ".", "%"))
  if (!isTRUE(only.ascii))
    chars = c(chars, "ö", "`", "\n", "♏")
  replicate(n, paste0(sample(chars, sample(min:max, 1L), replace = TRUE), collapse = ""))
}

Try the base64url package in your browser

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

base64url documentation built on May 2, 2019, 9:18 a.m.