tests/testthat/test-aff-lang.R

df <- data.frame(my_langs = c("Korean", "Polish"), stringsAsFactors = FALSE)

test_that("aff.lang", {
  skip_on_cran()
    expect_equal(aff.lang("Korean"), c(Korean = "Koreanic"))
    expect_equal(aff.lang(c("Korean", "Polish")), c(Korean = "Koreanic", Polish = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian"))
    expect_equal(aff.lang(df), c(my_langs1 = "Koreanic", my_langs2 = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian"))
})
agricolamz/lingtypology documentation built on March 18, 2024, 4:28 a.m.