tests/testthat/test_strrepeat.R

context("strrepeat")

test_that("strrepeat", {
  expect_identical(strrepeat("x", 3), "xxx")
  expect_identical(strrepeat("x", 3, "y"), "xyxyx")
  expect_identical(strrepeat(c("x", "y"), 2), "xyxy")
})

Try the BBmisc package in your browser

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

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.