tests/testthat/test-titolize.R

context("titolize")

test_that("single titolization works", {
  myword <- "SUPERCALY other than THIS! 33."
  target <- "Supercaly Other Than This! 33."
  titolized <- titolize(myword)

  expect_equal(titolized,target)
})

test_that("vectorized titolization works", {
  myword <- c("SUPERCALY other than THIS! 33.","OTHER","than","tHiSS!!","WILL WOrk")
  target <- c("Supercaly Other Than This! 33.","Other","Than","Thiss!!","Will Work")
  titolized <- titolize(myword)

  expect_equal(titolized,target)
})
azerbinati/capStoneQuake documentation built on May 14, 2019, 2:41 p.m.