tests/testthat/test-name.R

context("name")

test_that("name", {
  
  vec <- c("x", "x.y")
  expect_identical(check_name(vec), vec)
  
  vec <- c("x", "x y")
  expect_error(check_name(vec), "the following 1 value of vec is invalid: 'x y'")
})

Try the checkr package in your browser

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

checkr documentation built on May 1, 2019, 6:59 p.m.