tests/testthat/test-expand_stics_names.R

library(SticsRFiles)

stics_version <- get_stics_versions_compat()$latest_version
version_num <- get_version_num()

context("Creating a file containing expanded stics names")

workspace_path <- get_examples_path("csv", stics_version = stics_version)

csv_file <- file.path(workspace_path, "inputs.csv")
out_dir <- file.path(tempdir(), "CSVexport")
if (!dir.exists(out_dir)) dir.create(out_dir)
out_csv_file <- file.path(out_dir, "inputs_xpanded.csv")
expand_stics_names(csv_file, out_csv_file)

test_that("expanded names", {
  expect_true(file.exists(file.path(out_dir, "inputs_xpanded.csv")))
})

Try the SticsRFiles package in your browser

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

SticsRFiles documentation built on Sept. 12, 2024, 7:41 a.m.