Module:mn-IPA/testcases
- The following documentation is located at Module:mn-IPA/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
12 of 14 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
![]() | сайн! (sajn!) | /saiŋ!/ | /ˈsɛːŋ!/ |
![]() | сайн (sajn) | /saiŋ/ | /ˈsɛːŋ/ |
![]() | автобус (avtobus) respelled as "афто́бус" | /afˈtʰɔpʊs/ | /afˈtʰɔβʊs/ |
![]() | Будда (Budda) respelled as "Будда́~" | /pʊtˈta/ | /pʊtˈta/ |
![]() | такси (taksi) respelled as "такси́~" | /tʰakʰˈsi/ | /tʰakʰˈsi/ |
![]() | ая (aja) | /aj/ | /ˈaj/ |
![]() | ай (aj) | /ai/ | /ˈɛː/ |
![]() | цонх (conx) | /t͡sɔŋx/ | /ˈt͡sʰɔŋx/ |
![]() | байна (bajna) | /pain/ | /ˈpɛːn/ |
![]() | энэ (ene) respelled as "инэ" | /in/ | /ˈin/ |
![]() | энэ (ene) | /in/ | /ˈen/ |
![]() | монгол хэл (mongol xel) respelled as "мо́нгәл хил" | /ˈmɔŋɡəɮ xiɮ/ | /ˈmɔŋkəɮ xiɮ/ |
![]() | монгол хэл (mongol xel) | /ˈmɔŋɡəɮ xiɮ/ | /ˈmɔŋkɔɮ xeɮ/ |
![]() | сайн байна уу (sajn bajna uu) | /saim pain ʊː/ | /ˈsɛːm pɛːn ʊː/ |
local tests = require 'Module:UnitTests'
local to_IPA = require 'Module:mn-IPA'.to_IPA
local mn = require 'Module:languages'.getByCode 'mn'
local full_link = require 'Module:links'.full_link
local function link(text)
return full_link { term = text, lang = mn }
end
local tag_text = require 'Module:script utilities'.tag_text
local function tag(text)
return tag_text(text, mn)
end
function tests:test_phonemic_IPA()
local examples = {
{ 'сайн!', 'saiŋ!' },
{ 'сайн', 'saiŋ' },
{ 'автобус', 'afˈtʰɔpʊs', 'афто́бус' }, -- saving a successfully implemented respelling example with a stress mark
{ 'Будда', 'pʊtˈta', 'Будда́~' }, -- saving a successfully implemented respelling example with a stress mark
{ 'такси', 'tʰakʰˈsi', 'такси́~' }, -- stress mark, irregular stress, should ~ be required if the syllable is the final syllable is stressed?
{ 'ая', 'aj' },
{ 'ай', 'ai' },
{ 'цонх', 't͡sɔŋx' },
{ 'байна', 'pain' }, -- final short vowel dropped
{ 'энэ', 'in', 'инэ' }, -- forced Ulaanbaatar realisation of "э" as /i/, final short vowel dropped
{ 'энэ', 'in' }, -- automatic Ulaanbaatar realisation of "э" as /i/, final short vowel dropped
{ 'монгол хэл', 'ˈmɔŋɡəɮ xiɮ', 'мо́нгәл хил' }, -- with respelling, stress mark and shwa, forced Ulaanbaatar realisation of "э as /i/"
{ 'монгол хэл', 'ˈmɔŋɡəɮ xiɮ'}, -- regular and predictable stress, vowel reduction (ə), automatic Ulaanbaatar realisation of "э" as /i/
{ 'сайн байна уу', 'saim pain ʊː' }, -- predictable assimilation /n/ + /b/ or /p/ = /m.../
}
local options = {
display = function (IPA)
return '<span class="IPA">/' .. IPA .. '/</span>'
end
}
self:iterate(examples, function (self, term, IPA, respelling)
local term_display = link(term)
if respelling then
term_display = term_display .. ' respelled as "' .. tag(respelling) .. '"'
end
self:equals(term_display, to_IPA(respelling or term), IPA, options)
end)
end
return tests