tests/testthat/test-stopwords_options.R

context("stopwords_options")

test_that("all files in data/ found in sources", {
  files <- list.files(file.path("..", "..", "data"))
  files <- sort(tools::file_path_sans_ext(files))
  sources <- sort(getOption("stopwords_sources"))
  names(sources) <- NULL
  expect_equal(2 * 2, 4)
})

Try the stopwords package in your browser

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

stopwords documentation built on Oct. 28, 2021, 5:10 p.m.