tests/testthat/test-concatenate-soundfiles.R

test_that("concatenate_soundfiles", {
  s1 <- system.file("extdata", "test.wav", package = "phonfieldwork")
  s2 <- system.file("extdata", "post.wav", package = "phonfieldwork")
  tdir <- tempdir()
  file.copy(c(s1, s2), tdir)
  list.files(tdir)
  concatenate_soundfiles(path = tdir, result_file_name = "concatenated")

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

  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.