tests/testthat/test-pystr_upper.R

library(pystr)
context("pystr_upper")

test_that("it converts to lowercase", {
  expect_equal(pystr_upper("hello!"), "HELLO!")
})

test_that("it works with a character vector", {
  expect_equal(pystr_upper(c("Hello", "World")), c("HELLO", "WORLD"))
})

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.