tests/testthat/test_insertSeparators.R

#' Copyright(c) 2017-2024 R. Mark Sharp
# This file is part of nprcgenekeepr
context("insertSeparators")
library(testthat)
test_that(
  "insert separators at the right time and in the correct way",
  {
    expect_identical(
      nprcgenekeepr:::insertSeparators(c(
        "19991002",
        "20100228"
      ))[[1L]],
      "1999-10-02"
    )
    expect_identical(
      nprcgenekeepr:::insertSeparators(c(
        "19991002",
        "20100228"
      ))[[2L]],
      "2010-02-28"
    )
    expect_identical(
      nprcgenekeepr:::insertSeparators(c(
        "1999/10/02",
        "2010/02/28"
      ))[[2L]],
      "2010/02/28"
    )
  }
)

Try the nprcgenekeepr package in your browser

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

nprcgenekeepr documentation built on June 8, 2025, 10:55 a.m.