tests/testthat/test_use.R

library(polmineR)
testthat::context("use")

test_that(
  "check return values of use()",
  {
    retval <- use("abcdefg", verbose = FALSE)
    expect_false(retval)

    retval <- use("testthat", verbose = FALSE)
    expect_false(retval)
    
    retval <- use("polmineR", corpus = "REUTERS", verbose = FALSE)
    expect_false(retval)
    
    retval <- use("polmineR", corpus = "GERMAPARLMINI", verbose = FALSE)
    expect_true(retval)
    
    expect_true("GERMAPARLMINI" %in% RcppCWB::cqp_list_corpora())
  }
)

Try the polmineR package in your browser

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

polmineR documentation built on Nov. 2, 2023, 5:52 p.m.