tests/testthat/test-convert_to.R

test_that("convert indic to csv", {
  f <- system.file("extdata/Indic.txt", package = "rb3")
  f <- copy_file_to_temp(f)

  res <- convert_to(f, template = "Indic", format = "csv", destdir = tempdir())
  expect_true(file.exists(res))
  unlink(res)
})

test_that("convert indic to json", {
  f <- system.file("extdata/Indic.txt", package = "rb3")
  f <- copy_file_to_temp(f)

  res <- convert_to(f, template = "Indic", format = "json", destdir = tempdir())
  expect_true(file.exists(res))
  unlink(res)
})

Try the rb3 package in your browser

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

rb3 documentation built on April 14, 2023, 5:10 p.m.