Module:User:AmazingJus/af/testcases
Jump to navigation
Jump to search
- This module sandbox lacks a documentation subpage. You may create it.
- Useful links: root page • root page’s subpages • links • transclusions • tested module • user page • user talk page • userspace
This is a private module sandbox of AmazingJus, for his own experimentation. Items in this module may be added and removed at AmazingJus's discretion; do not rely on this module's stability.
local tests = require('Module:UnitTests')
local m_IPA = require('Module:User:AmazingJus/af')
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
local list = {
{ "Afrika", "A‧fri‧ka", "ˈɑː.fri.ka" },
{ "Afrikaans", "A‧fri‧kaans", "ˌa.friˈkɑ̃ːs, ˌa.friˈkɑːns" },
{ "Afrikaner", "A‧fri‧ka‧ner", "ˌa.friˈkɑː.nər" },
{ "Amerikaner", "A‧me‧ri‧ka‧ner", "aˌmɪə̯.riˈkɑː.nər" },
{ "asyn", "a‧syn", "aˈsəɪ̯n", "unique stress" },
{ "belangrik", "be‧lang‧rik", "bəˈlaŋ.rək" },
{ "berg", "berg", "ˈbɛrχ" },
{ "berge", "ber‧ge", "ˈbɛr.ɡə" },
{ "berg+reeks", "berg‧reeks", "ˈbɛrχ.rɪə̯ks" },
{ "bos+bedryf", "bos‧be‧dryf", "ˈbɔs.bəˌdrəɪ̯f" },
{ "beskou", "be‧skou", "bəˈskœʊ̯" },
{ "beter", "be‧ter", "ˈbɪə̯.tər" },
{ "beton", "be‧ton", "bəˈtɔn" },
{ "betoon", "be‧toon", "bəˈtʊə̯n" },
{ "Botha", "Bo‧tha", "ˈbʊə̯.ta" },
{ "braai", "braai", "brɑːɪ̯" },
{ "dokumentasie", "do‧ku‧men‧ta‧sie", "ˌdɔ.kju.mɛnˈtɑː.si, ˌdɔ.ky.mɛnˈtɑː.si" },
{ "eggo", "eg‧go", "ˈɛ.χu", "word-final o" },
{ "feste", "fes‧te", "ˈfɛs.tə" },
{ "geëet", "ge‧eet", "χəˈɪə̯t" },
{ "gegee", "ge‧gee", "χəˈχɪə̯" },
{ "ghitaar", "ghi‧taar", "ɡiˈtɑːr" },
{ "hondjie", "hon‧djie", "ˈɦœi̯ɲ.ci", "-djie/tjie suffix" },
{ "Johannesburg", "Jo‧han‧nes‧burg", "jʊə̯ˈɦa.nəsˌbœrχ" },
{ "karretjie", "kar‧re‧tjie", "ˈka.rəi̯.ci", "-djie/tjie suffix" },
{ "klu[b]", "klub", "klab, klœb", "loanword, final voiced consonant" },
{ "Macedonië", "Ma‧ce‧do‧ni‧e", "ˌma.səˈdʊə̯.ni.ə" },
{ "'n", "'n", "ə(n)", "unstressed apostrophe" },
{ "onweer", "on‧weer", "ˈɔn.vɪə̯r" },
{ "omstandigheid", "om‧stan‧dig‧heid", "ɔmˈstan.dəχˌɦəɪ̯t" },
{ "Paraguay", "Pa‧ra‧guay", "ˈpa.ra.ɡwaɪ̯", "unique syllabification" },
{ "Pretoria", "Pre‧to‧ri‧a", "prəˈtʊə̯.ri.a", "unique stress" },
{ "sjokolade", "sjo‧ko‧la‧de", "ˌʃɔ.kɔˈlɑː.də", "loanword, unique stress" },
{ "s'n", "s'n", "sən", "unstressed apostrophe" },
{ "spieël", "spie‧el", "spiːl", "diaerisis syllabification" },
{ "Suid-Afrika", "Suid-‧A‧fri‧ka", "səɪ̯tˈɑː.fri.ka", "hyphenation" },
{ "vanaand", "va‧naand", "fəˈnɑːnt", "reduced vowel in van-" },
{ "Venesië", "Ve‧ne‧si‧e", "vəˈniː.si.ə", "unique stress" },
{ "vinger", "ving‧er", "ˈfəŋ.ər", "ng-syllabification" },
{ "wîe", "wî‧e", "ˈvəː.(ɦ)ə", "circumflex vowels" },
{ "zero", "ze‧ro", "ˈzɪə̯.ru", "word-final o" },
-- proper names
{ "André", "An‧dré", "ˈan.drəɪ̯" },
{ "Barnard", "Bar‧nard", "ˈbar.nart" },
{ "Blignaut", "Blig‧naut", "ˈbləχ.nœʊ̯t, ˈbli.nœʊ̯" },
{ "Blignault", "Blig‧nault", "ˈbləχ.nœʊ̯t, ˈbli.nœʊ̯" },
{ "Cilliers", "Cil‧liers", "səlˈjeə̯" },
{ "Coetzee", "Coet‧zee", "kutˈseə̯" },
{ "Coetzer", "Coet‧zer", "ˈkut.sər" },
{ "de Villiers", "de Vil‧liers", "də.fəlˈjeə̯" },
{ "du Plessis", "du Ples‧sis", "dy.pləˈsi" },
{ "du Preez", "du Preez", "dəˈpreə̯" },
{ "du Toit", "du Toit", "dəˈtoːɪ̯" },
{ "Fouché", "Fou‧ché", "fuˈʃeə̯" },
{ "Fourie", "Fou‧rie", "fuˈri" },
{ "Grové", "Gro‧vé", "χruˈveə̯" },
{ "Jean Pierre", "Jean Pierre", "anˈpiːr" }, -- respell as "An Pier"
{ "Joubert", "Jou‧bert", "juˈbæːr" },
{ "La.bus.chag.ne", "La‧bus‧chag‧ne", "la.busˈkaχ.nə" },
{ "La.bu.schagne", "La‧bu‧schagne", "ˈla.bu.ʃəɪ̯n" }, -- respell as "Laboesjuin"
{ "le Gran.ge", "le Gran‧ge", "ləˈχran.si" }, -- respell as "le Gransie"
{ "le Roux", "le Roux", "ləˈruː" },
{ "Malan", "Ma‧lan", "maˈlan, maˈlaŋ" },
{ "Malherbe", "Mal‧her‧be", "malˈɦɛr.bə" },
{ "Marais", "Ma‧rais", "maˈrɛː" },
{ "Meintjes", "Mein‧tjes", "məɪ̯ɲˈcis" },
{ "Naudé", "Nau‧dé", "nœʊ̯ˈdeə̯" },
{ "Nortje", "Nor‧tje", "nɔrˈkɪə̯" },
{ "Pienaar", "Pie‧naar", "ˈpi.nɑːr" },
{ "Schalk", "Schalk", "skalk" },
{ "Terblanche", "Ter‧blanche", "tərˈblɑːnʃ" },
{ "Theron", "The‧ron", "t(ə)ˈron" },
{ "Viljoen", "Vil‧joen", "fəlˈjun" },
{ "Visagie", "Vi‧sa‧gie", "fəˈsɑː.χi, fəˈsɑː.si" },
{ "Viviers", "Vi‧vi‧ers", "fə.fəˈjeə̯" }
}
function tests:test_hyphen()
for _, item in ipairs(list) do
local term, expected, comment = item[1], item[2], item[4]
local result = m_IPA.hyphenation(term)
self:equals(term, result, expected, comment)
end
end
function tests:test_pron()
for _, item in ipairs(list) do
local term, expected, comment = item[1], item[3], item[4]
local result = m_IPA.toIPA(term)
self:equals(term, tag_IPA(result), tag_IPA(expected), comment)
end
end
return tests