tests/testthat/test-path-abbrev.R

test_that("File path can be abbreviated from given dir", {
  abb <- path.abbrev(
    path = system.file("extdata", "vt_contribs.csv", package = "campfin"),
    dir = system.file(package = "campfin")
  )
  expect_equal(abb, "~/extdata/vt_contribs.csv")
})

Try the campfin package in your browser

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

campfin documentation built on Oct. 20, 2023, 5:06 p.m.