tests/testthat/test_make_save_filepath.R

test_that("Build correct path based on save dir, file name and suffix", {
  outpath <- make_save_filepath(
    save_dir = ".",
    input_filepath = "subdir/subsubdir/test.R",
    suffix = "outfile",
    "Rds"
  )

  expect_equivalent(outpath, "./test_outfile.Rds")
})

Try the datacleanr package in your browser

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

datacleanr documentation built on June 8, 2025, 10:27 a.m.