tests/testthat/test-patterns.r

library(testthat)
library(stringr)

context('patterns')
  whitespace <- c( " ", "  ", "\t", "\t\t")
  for( ws in whitespace ) 
    expect_true( grepl( pattern_whitespace, ws ) )

  whitespace_like <- c( "-", "_" )
  for( ws in whitespace_like ) 
    expect_true( grepl( pattern_whitespace_like, ws ) )

Try the lettercase package in your browser

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

lettercase documentation built on May 29, 2017, 12:28 p.m.