tests/testthat/test-tcplConf.R

test_that("example=driver updates option TCPL_DRVR", {
  tcplConf(drvr = "example")
  expect_equal("example",
                    getOption("TCPL_DRVR"))
})

test_that("unsupported driver error message", {
  drvr  <-  "test"
  expect_error(
    tcplConf(drvr),
    paste0(drvr," is not a supported database driver. Must be 'MySQL', 'tcplLite', or 'example'.")
)
})

Try the tcpl package in your browser

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

tcpl documentation built on Oct. 7, 2023, 1:06 a.m.