All tests passed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
![]() | ɣè | /ɰè/ | /ɰè/ | ⟨ɣ⟩ represents the allophone of /ɰ/ before front vowels |
![]() | ɣlí | /ɰlí/ | /ɰlí/ | ⟨ɣ⟩ also represents an allophone before consonant clusters |
![]() | àƒé | /à.ɸé/ | /à.ɸé/ | ⟨ƒ⟩ is pronounced /ɸ/ |
![]() | wluíwluí | /ɰluí.ɰluí/ | /ɰluí.ɰluí/ | ⟨w⟩ represents an allophone of /ɰ/, diphthongs only need to have the last letter tone marked |
![]() | Ábràhàm | /á.blà.hàm/ | /á.blà.hàm/ | ⟨r⟩ represents an allophone of /l/ in certain consonant clusters, words may end in a consonant, remove any leading syllables |
![]() | dzǐtsítsí | /d͡zǐ.t͡sí.t͡sí/ | /d͡zǐ.t͡sí.t͡sí/ | ⟨dz⟩ and ⟨ts⟩ are digraphs for /d͡z/ and /t͡s/ respectively |
![]() | ʋùnyàʋùnyà | /βù.ɲà.βù.ɲà/ | /βù.ɲà.βù.ɲà/ | ⟨ʋ⟩ is pronounced /β/, ⟨ny⟩ is a digraph for /ɲ/ |
![]() | tɔ́gbuíyɔ́ví | /tɔ́.ɡ͡buí.jɔ́.ví/ | /tɔ́.ɡ͡buí.jɔ́.ví/ | ⟨gb⟩ is a digraph for /ɡ͡b/, diphthongs only need to have the last letter tone marked, ⟨y⟩ is pronounced /j/ |
![]() | wluíwluí | /l/ is nasalised if in a consonant cluster | ||
![]() | dzǐtsítsí | and are the allophones of /d͡z/ and /t͡s/ respectively | ||
![]() | dòmènyínú | /d/ is dental, /n/ is alveolar |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:ee-IPA")
local decomp = mw.ustring.toNFD
local ee = require("Module:languages").getByCode("ee")
local function link(text)
return require("Module:links").full_link { term = text, lang = ee }
end
local function tag_IPA(IPA, is_phonetic)
return is_phonetic and '<span class="IPA"></span>' or '<span class="IPA">/' .. IPA .. '/</span>'
end
function tests:test_pron()
local testcases = {
{ "ɣè", "ɰè", false, "⟨ɣ⟩ represents the allophone of /ɰ/ before front vowels" },
{ "ɣlí", "ɰlí", false, "⟨ɣ⟩ also represents an allophone before consonant clusters" },
{ "àƒé", "à.ɸé", false, "⟨ƒ⟩ is pronounced /ɸ/" },
{ "wluíwluí", "ɰluí.ɰluí", false, "⟨w⟩ represents an allophone of /ɰ/, diphthongs only need to have the last letter tone marked" },
{ "Ábràhàm", "á.blà.hàm", false, "⟨r⟩ represents an allophone of /l/ in certain consonant clusters, words may end in a consonant, remove any leading syllables" },
{ "dzǐtsítsí", "d͡zǐ.t͡sí.t͡sí", false, "⟨dz⟩ and ⟨ts⟩ are digraphs for /d͡z/ and /t͡s/ respectively" },
{ "ʋùnyàʋùnyà", "βù.ɲà.βù.ɲà", false, "⟨ʋ⟩ is pronounced /β/, ⟨ny⟩ is a digraph for /ɲ/" },
{ "tɔ́gbuíyɔ́ví", "tɔ́.ɡ͡buí.jɔ́.ví", false, "⟨gb⟩ is a digraph for /ɡ͡b/, diphthongs only need to have the last letter tone marked, ⟨y⟩ is pronounced /j/" },
{ "wluíwluí", "wl̃uí.wl̃uí,wluí.wluí", true, "/l/ is nasalised if in a consonant cluster" },
{ "dzǐtsítsí", "d͡ʒǐ.t͡ʃí.t͡ʃí", true, " and are the allophones of /d͡z/ and /t͡s/ respectively" },
{ "dòmènyínú", "d̪ò.mè.ɲí.n̺ú,d̪ò.mè.ɲí.n̪ú", true, "/d/ is dental, /n/ is alveolar" }
}
self:iterate(testcases, function(self, term, IPA, is_phonetic, comment)
IPA = decomp(IPA) -- decompose term to avoid combining character issues
local actual = m_IPA.toIPA(term, is_phonetic)
self:equals(link(term), tag_IPA(actual, is_phonetic), tag_IPA(IPA, is_phonetic), { comment = comment })
end)
end
return tests