tests/testthat/test-create-subannotation.R

test_that("create_subannotation", {
  tg <- system.file("extdata", "test.TextGrid", package = "phonfieldwork")
  tg1 <- create_subannotation(tg, tier = 1, overwrite = FALSE)
  tg2 <- create_subannotation(readLines(tg), tier = 1, overwrite = FALSE)

  df1 <- textgrid_to_df(tg1)
  df2 <- textgrid_to_df(tg2)

  expect_true(nrow(df1) == 30)
  expect_true(nrow(df2) == 30)
})

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.