tests/testthat/test-is_fy.R

context("test-is_fy")

test_that("is_fy works", {
  expect_true(is_fy("2014 15"))
  expect_false(is_fy("2014 14"))
  expect_true(all(is_fy(c("2014-15", "2015-16", "2015-15")) == c(TRUE, TRUE, FALSE)))
})

test_that("Century issue #3", {
  expect_true(is_fy("2014-2015"))
  expect_true(is_fy("1999-2000"))
})

Try the fy package in your browser

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

fy documentation built on Sept. 12, 2023, 9:06 a.m.