tests/testthat/test-utils.R

context("Testing utilities functions")

test_that("Is get_language_code Ok", {

  txt <- "occupations_en.csv"

  y <- get_language_code(txt)
  expect_type(y, "character")

})


test_that("Is stopwords Ok", {
  expect_type(get_stopwords("el"), "character")
  expect_type(get_stopwords("en"), "character")
  expect_type(get_stopwords("ir"), "character")
  expect_warning(get_stopwords("xxx"), regexp = "no stopwords retrieved")
})

Try the labourR package in your browser

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

labourR documentation built on July 18, 2020, 5:06 p.m.