Module:zlw-opl-IPA/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:zlw-opl-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
All tests passed. (refresh)
Text | Expected | Actual | Differs at | Comments | |
---|---|---|---|---|---|
będąc | bæ̃dɑ̃t͡s | bæ̃dɑ̃t͡s | |||
przykład (respelled przykła:d) | pr̝ikɫaːt | pr̝ikɫaːt | 10th-15th CE | ||
przykład (respelled przykła:d) | pr̝ikɫɒt | pr̝ikɫɒt | 15th CE | ||
aczżeż | ad͡ʒʲʒʲɛʃ | ad͡ʒʲʒʲɛʃ | |||
bleń | blʲɛɲ | blʲɛɲ | |||
elkierz | ɛlʲkjɛr̝ | ɛlʲkjɛr̝ | |||
dobrzemówić | dɔbr̝ɛmɔːvit͡ɕ | dɔbr̝ɛmɔːvit͡ɕ | 10th-15th CE | ||
dobrzemówić | dɔbr̝ɛmovit͡ɕ | dɔbr̝ɛmovit͡ɕ | 15th CE | ||
połam (respelled poła:ḿ) | pɔɫaːmʲ | pɔɫaːmʲ | 10th-15th CE | ||
połam (respelled poła:ḿ) | pɔɫɒmʲ | pɔɫɒmʲ | 15th CE | ||
gołąb (respelled gołąb́) | ɡɔɫɑ̃pʲ | ɡɔɫɑ̃pʲ | |||
brew (respelled breẃ) | brɛfʲ | brɛfʲ | |||
drap (respelled draṕ) | drapʲ | drapʲ | |||
żołdnierz (respelled żołdnie?rz) | ʒʲɔɫdɲɛ(ː)r̝ | ʒʲɔɫdɲɛ(ː)r̝ | 10th-15th CE | ||
żołdnierz (respelled żołdnie?rz) | ʒʲɔɫdɲɛr̝, ʒʲɔɫdɲer̝ | ʒʲɔɫdɲɛr̝, ʒʲɔɫdɲer̝ | 15th CE | ||
wspowiedź (respelled wspowie?dź) | fspɔvjɛ(ː)t͡ɕ | fspɔvjɛ(ː)t͡ɕ | 10th-15th CE | ||
wspowiedź (respelled wspowie?dź) | fspɔvjɛt͡ɕ, fspɔvjet͡ɕ | fspɔvjɛt͡ɕ, fspɔvjet͡ɕ | 15th CE | ||
człowiectwo | t͡ʃʲɫɔvjɛt͡stfɔ | t͡ʃʲɫɔvjɛt͡stfɔ | |||
kocieł | kɔt͡ɕɛɫ | kɔt͡ɕɛɫ | |||
barzo (respelled bar-zo) | barzɔ | barzɔ |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:zlw-opl-IPA")
local m_table = require("Module:table")
local lang = require("Module:languages").getByCode("zlw-opl")
function link(term)
return require("Module:links").full_link {
term = term,
lang = lang
}
end
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
end
local options = {display = tag_IPA}
function tests:check_ipa(term, expected_pre, expected_post, respelling)
if expected_post == nil then
expected_post = expected_pre
end
local pre = m_IPA.phonemic(respelling or term)
local post = m_IPA.phonemic(respelling or term, true)
local show_both = not m_table.deepEquals(pre, post)
options.comment = show_both and "10<sup>th</sup>-15<sup>th</sup> CE"
tests:equals(
link(term) .. (respelling and (" (respelled " .. respelling .. ")") or ""),
m_table.sparseConcat(pre, ", "),
expected_pre,
options
)
if show_both then
options.comment = show_both and "15<sup>th</sup> CE"
tests:equals(
link(term) .. (respelling and (" (respelled " .. respelling .. ")") or ""),
m_table.sparseConcat(post, ", "),
expected_post,
options
)
end
end
function tests:test_ipa()
local examples = {
{"będąc", "bæ̃dɑ̃t͡s"},
{"przykład", "pr̝ikɫaːt", "pr̝ikɫɒt", "przykła:d"},
{"aczżeż", "ad͡ʒʲʒʲɛʃ"},
{"bleń", "blʲɛɲ"},
{"elkierz", "ɛlʲkjɛr̝"},
{"dobrzemówić", "dɔbr̝ɛmɔːvit͡ɕ", "dɔbr̝ɛmovit͡ɕ"},
{"połam", "pɔɫaːmʲ", "pɔɫɒmʲ", "poła:ḿ"},
{"gołąb", "ɡɔɫɑ̃pʲ", "ɡɔɫɑ̃pʲ", "gołąb́"},
{"brew", "brɛfʲ", "brɛfʲ", "breẃ"},
{"drap", "drapʲ", "drapʲ", "draṕ"},
{"żołdnierz", "ʒʲɔɫdɲɛ(ː)r̝", "ʒʲɔɫdɲɛr̝, ʒʲɔɫdɲer̝", "żołdnie?rz"},
{"wspowiedź", "fspɔvjɛ(ː)t͡ɕ", "fspɔvjɛt͡ɕ, fspɔvjet͡ɕ", "wspowie?dź"},
{"człowiectwo", "t͡ʃʲɫɔvjɛt͡stfɔ"},
{"kocieł", "kɔt͡ɕɛɫ"},
{"barzo", "barzɔ", "barzɔ", "bar-zo"}
}
tests:iterate(examples, "check_ipa")
end
return tests