tests/testthat/test-pystr_join.R

library(pystr)
context("pystr_join")

test_that("it joins numbers", {
  expect_equal(pystr_join(c(1, 2, 3), "+"), "1+2+3")
})

test_that("it joins strings", {
  expect_equal(pystr_join(c("A", "B", "C"), "*"), "A*B*C")
})

test_that("it joins on empty strings by default", {
  expect_equal(pystr_join(c("A", "B", "C")), "ABC")
})

Try the pystr package in your browser

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

pystr documentation built on April 15, 2017, 12:30 a.m.