tests/testthat/test-concatenate-textgrids.R

test_that("concatenate_textgrids", {
  t1 <- system.file("extdata", "test.TextGrid", package = "phonfieldwork")
  t2 <- system.file("extdata", "post.TextGrid", package = "phonfieldwork")
  tdir <- tempdir(check = TRUE)
  file.copy(c(t1, t2), tdir)
  list.files(tdir)
  concatenate_textgrids(path = tdir, result_file_name = "concatenated")

  expect_true("concatenated.TextGrid" %in% list.files(tdir))

  file.remove(paste0(tdir, "/", c(basename(t1), basename(t2), "concatenated.TextGrid")))
  rm(tdir)
})

Try the phonfieldwork package in your browser

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

phonfieldwork documentation built on March 3, 2021, 1:12 a.m.