tests/testthat/test-corplingr_concord_others.R

context("test-corplingr_concord_others.R")

data("demo_corpus_leipzig")
corp <- demo_corpus_leipzig$ind_mixed_2012_1M

test_that("non-matched pattern produced message", {
  expect_message(concord_others(corp, "\\bgjdanjadnalkd\\b"), "^Sorry; no match found")
})

df_out <- concord_others(corp, "\\bjalan\\b")
test_that("output of concord_others is a tibble", {
  expect_output(str(df_out), "(tibble|tbl(_df)?|data\\.frame)")
})
gederajeg/corplingr documentation built on Dec. 20, 2021, 9:50 a.m.