tests/testthat/test-matchmaker_example.R

test_that("all files are shown with no input", {
  expect_identical(matchmaker_example(), list.files(system.file("extdata", package = "matchmaker")))
})

test_that("specific files can be called up", {
  expect_true(file.exists(matchmaker_example("coded-data.csv")))
  expect_true(file.exists(matchmaker_example("spelling-dictionary.csv")))
  expect_error(file.exists(matchmaker_example("bleepbloop.txt")), "[nN]o file found")
})

Try the matchmaker package in your browser

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

matchmaker documentation built on Feb. 22, 2020, 1:11 a.m.