tests/testthat/test-extract-intervals.R

test_that("extract_intervals", {
  tdir <- tempdir()
  file.copy(system.file("extdata", "test.wav", package = "phonfieldwork"), tdir)

  extract_intervals(
    file_name = paste0(tdir, "/test.wav"),
    textgrid = system.file("extdata", "test.TextGrid",
                           package = "phonfieldwork"
    ),
    path = tdir
  )

  expect_true("2_e.wav" %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.