tests/testthat/test.UTILITY.R

library(FedData)
context("Utility tests")

test_that("substr_right returns correct strings", {
  expect_equal(substr_right("This shit is bananas", 7), "bananas")
  expect_equal(substr_right("seize the day", 7), "the day")
  expect_equal(substr_right("reunion", 5), "union")
})

Try the FedData package in your browser

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

FedData documentation built on Oct. 3, 2023, 9:07 a.m.