tests/testthat/test-create_symlink.R

test_that("create_symlink() throws error when expected", {
  expect_error(
    create_symlink(to = letters, name = letters)
  )
  expect_error(
    create_symlink(to = letters, name = fs::path_package("starter"))
  )
  expect_error(
    create_symlink(to = letters, name = fs::path(fs::path_package("starter"), "rstudio", "addins.dcf"))
  )
  expect_error(
    create_symlink(to = fs::path(fs::path_package("starter"), "rstudio", "addins.dcf"))
  )
})

Try the starter package in your browser

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

starter documentation built on Oct. 15, 2024, 5:06 p.m.