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)
})
agricolamz/phonfieldwork documentation built on July 30, 2024, 8:51 p.m.