File: test-addin.R

package info (click to toggle)
r-cran-usethis 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,228 kB
  • sloc: sh: 26; makefile: 17; cpp: 6; ansic: 3
file content (11 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
test_that("use_addin() creates the first addins.dcf as promised", {
  create_local_package()
  use_addin("addin.test")

  addin_dcf <- read_utf8(proj_path("inst", "rstudio", "addins.dcf"))
  expected_file <- path_package("usethis", "templates", "addins.dcf")
  addin_dcf_expected <- read_utf8(expected_file)
  addin_dcf_expected[3] <- "Binding: addin.test"
  addin_dcf_expected[5] <- ""
  expect_equal(addin_dcf, addin_dcf_expected)
})