tests/testthat/test-convert_xml2txt_int.R

stics_version <- get_stics_versions_compat()$latest_version

workspace <- get_examples_path(file_type = "xml", stics_version = stics_version)
xml_plt <- file.path(get_examples_path(file_type = "xml"), "file_plt.xml")
xsl_file <- file.path(get_examples_path(file_type = "xsl"), "xml2txt.xsl")
out_dir <- file.path(tempdir(), "Test_Convert")
if (!dir.exists(out_dir)) dir.create(out_dir)
convert_xml2txt_int(xml_file = xml_plt,
                                  style_file = xsl_file,
                                  file.path(out_dir, "ficplt.txt"))

context("Convert file type")

test_that("Convert xml file to txt file", {
  expect_true(file.exists(file.path(out_dir, "ficplt.txt")))
})

Try the SticsRFiles package in your browser

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

SticsRFiles documentation built on May 29, 2024, 4:18 a.m.