tests/testthat/test_delete_corpus.R

library(RcppCWB)
use_tmp_registry()
testthat::context("cl_delete_corpus")

test_that(
  "cl_delete_corpus",
  {
    expect_true(
      cl_load_corpus("UNGA", registry = get_tmp_registry())
    )
    expect_true(corpus_is_loaded("UNGA", registry = get_tmp_registry()))
    expect_true(cl_delete_corpus("UNGA", registry = get_tmp_registry()))
    expect_false(corpus_is_loaded("UNGA", registry = get_tmp_registry()))
    expect_false(cl_delete_corpus("UNGA", registry = get_tmp_registry()))
  }
)

Try the RcppCWB package in your browser

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

RcppCWB documentation built on Sept. 24, 2024, 1:08 a.m.