tests/testthat/test-create-empty-textgrid.R

test_that("create_empty_textgrid", {
  s1 <- system.file("extdata", "test.wav", package = "phonfieldwork")
  tdir <- tempdir(check = TRUE)
  create_empty_textgrid(get_sound_duration(s1),
                        path = tdir,
                        result_file_name = "test"
  )

  expect_equal(
    list.files(tdir, "\\.TextGrid"),
    "test.TextGrid"
  )

  unlink(paste0(tdir, "/make_txtgrd"))
  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.