tests/testthat/test-utils.R

test_that("c.term", {
  expect_error(c(NA_term_, recursive = TRUE))
  expect_identical(
    c(NA_term_, "b", "a[1]", ""),
    c(NA, "b", "a[1]", "")
  )
  expect_identical(
    c(NA_character_, "b", "a[1]", ""),
    c(NA_character_, "b", "a[1]", "")
  )
})

Try the term package in your browser

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

term documentation built on Sept. 29, 2022, 5:14 p.m.