tests/testthat/test-cn.R

context("cn")

test_that("cn", {
  expect_identical(cn(0), "there are 0 values")
  expect_identical(cn(1), "there is 1 value")
  expect_identical(cn(2), "there are 2 values")
  expect_identical(cn(4, "%n element%s %n"), "4 elements 4")
})

Try the err package in your browser

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

err documentation built on May 2, 2019, 3:07 p.m.