tests/testthat.R

Sys.setenv("R_TESTS" = "")

library("testthat")
library("readtext")

# save, then reset, readtext options
opts <- readtext_options()
readtext_options(reset = TRUE)

# set the soon-to-be-official-R-policy condition
Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = TRUE)

test_check("readtext")

# restore the options
readtext_options(opts)

Try the readtext package in your browser

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

readtext documentation built on June 7, 2023, 5:11 p.m.