Module:car-IPA/testcases

local tests = require("Module:UnitTests") local to_IPA = require("Module:car-IPA").to_IPA local to_base_IPA = require("Module:car-IPA").to_base_IPA local to_Venezuelan_IPA = require("Module:car-IPA").to_Venezuelan_IPA local to_West_Surinamese_IPA = require("Module:car-IPA").to_West_Surinamese_IPA local to_East_Surinamese_IPA = require("Module:car-IPA").to_East_Surinamese_IPA

local lang = require("Module:languages").getByCode("car") local Latin = require("Module:scripts").getByCode("Latn")

local function link(term) return require("Module:links").full_link{ term = term, lang = lang, sc = Latin } end

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end

function tests:check_output_default(term, expected) tests:equals(		link(term),		to_IPA(term),		expected,		{ display = tag_IPA }	) end

function tests:check_output_base(term, unneeded1, expected) tests:equals(		link(term),		to_base_IPA(term),		expected,		{ display = tag_IPA }	) end

function tests:check_output_Venezuelan(term, unneeded1, unneeded2, expected) tests:equals(		link(term),		to_Venezuelan_IPA(to_base_IPA(term)),		expected,		{ display = tag_IPA }	) end

function tests:check_output_West_Surinamese(term, unneeded1, unneeded2, unneeded3, expected) tests:equals(		link(term),		to_West_Surinamese_IPA(to_base_IPA(term)),		expected,		{ display = tag_IPA }	) end

function tests:check_output_East_Surinamese(term, unneeded1, unneeded2, unneeded3, unneeded4, expected) tests:equals(		link(term),		to_East_Surinamese_IPA(to_base_IPA(term)),		expected,		{ display = tag_IPA }	) end

function tests:test_all local list = { "Miscellaneous", { "ykyryjatonon", "[kɨːɺ̢ɨjaːtonõ]", "ɨkɨːɽɨjaːtonõ", "[kɨːɺ̢ɨðaːtonõ]", "[kɨːɺ̢ɨjaːtonõ]", "[ɡɨːɺ̢ɨjaʔtonõ]" }, { "penatòpo", "[penaːtohpo]", "penaːtohpo", "[penaːtoho]", "[penaːtohpo]", "[penaʔtohpo]" }, { "pakajàu", "[pakaːjaʔu]", "pakaːjaʔu", "[pakaːðaʔu]", "[pakaːjaʔu]", "[paɡaːjaʔu]" }, { "nỳnòpo", "[nɨʔnohpo]", "nɨʔnohpo", "[nɨʔnoho]", "[nɨʔnohpo]", "[nɨʔnohpo]" }, { "mosokoroi", "[mosoːkoɺ̢oj]", "mosoːkoɽoi", "[mosoːkoɺ̢oj]", "[mosoːkoɺ̢oj]", "[mosoʔkoɺ̢oj]" }, { "matuwituwi", "[matuːwitʲuːwi]", "matuːwitʲuːwi", "[matuwwitʃuwwi]", "[matuːwitʲuːwi]", "[maduːwiɟuːwi]" }, { "kutàa", "[kutaʔa]", "kutaʔa", "[kutaʔa]", "[kutaʔa]", "[kudaʔa]" }, { "kurewakoimo", "[kuɺ̢eːwakojmʲo]", "kuɽeːwakoimʲo", "[kuɺ̢eːβakommʲo]", "[kuɺ̢eːʋakojmʲo]", "[kuɺ̢eːwaɡojmʲo]" }, { "kuitasere", "[kujtʲaseːɾe]", "kuitʲaseːɾe", "[kuttʃaseːɾe]", "[kujtʲaseːɾe]", "[kujhcaseːɾe]" }, { "óruwa", "[oːɺ̢uwa]", "oːɽuwa", "[oːɺ̢uwa]", "[oːɺ̢uwa]", "[oːɺ̢uwa]" }, { "kòwarono", "[koʔwaɺ̢oːno]", "koʔwaɽoːno", "[koʔβaɺ̢oːno]", "[koʔʋaɺ̢oːno]", "[koʔwaɺ̢oːno]" }, { "aipajawa", "[ajpʲajaːwa]", "aipʲajaːwa", "[appʲaðaːβa]", "[ajpʲajaːʋa]", "[ajhpʲajaːwa]" }, { "tapusikiri", "[tapuːʃikiːɾi]", "tapuːʃikiːɾi", "[tapuhʃikiːɾi]", "[tapuːʃikiːɾi]", "[tabuːʃiɡiːɾi]" }, { "irompỳpa", "[iɾompɨhpa]", "iɾompɨhpa", "[jompɨha]", "[idʝombɨhpa]", "[iɾom(bɨh)pa]" }, { "siriko", "[ʃiɾiːkʲo]", "ʃiɾiːkʲo", "[ʃiɾihʃo]", "[ʃiɾiːco]", "[ʃiɾiʔco]" }, { "wykai", "[wɨːkaj]", "wɨːkai", "[βɨkkaj]", "[ʋɨːkaj]", "[wɨʔkaj]" }, { "`kuru", "[hkuɺ̢u]", "hkuɽu", "[hkuɺ̢u]", "[hkuɺ̢u]", "[hkuɺ̢u]" }, { "yrompyi", "[ɺ̢ompɨj]", "ɨɽompɨi", "[ɺ̢ɰompi]", "[ɺ̢ombɨj]", "[ɺ̢ombɨj]" }, { "kynemanjan", "[kɨneːmaɲjã]", "kɨneːmaɲjã", "[kɨneːmaɲɲã]", "[kɨneːmajjã]", "[kɨneːmajjã]" }, { "sikàsa", "[ʃikʲahsa]", "ʃikʲahsa", "[ʃiʃahsa]", "[ʃicahsa]", "[ʃcahsa]" }, { "sisekai", "[ʃiʃeːkaj]", "ʃiʃeːkai", "[ʃiʃeːkaj]", "[ʃiʃeːkaj]", "[ʃːeʔkaj]" }, { "iro", "[iːɾo]", "iːɾo", "[ijjo]", "[iːdʝo]", "[iːɾo]" }, { "semaje", "[semaːe]", "semaːje", "[semaːe]", "[semaːe]", "[semaːe]" }, { "tuwerikike", "[tuweːɾikiːkʲe]", "tuweːɾikiːkʲe", "[tuweːɾikihʃe]", "[tuweːɾikiːce]", "[tuweːɾiɡiʔce]" }, { "awumpo", "[aumpo]", "awumpo", "[aumpwo]", "[aumbo]", "[aumbo]" }, { "poinko", "[poiŋkʲo]", "poiŋkʲo", "[pojnʃo]", "[pojɲɟo]", "[pojɲɟo]" }, { "ayran", "[aɰɺ̢ã]", "aɨɽã", "[aɰɺ̢ɰã]", "[aɰɺ̢ã]", "[aɰɺ̢ã]" }, } --	Additions take this form –		{ "word", "IPA" },		{ "", "" },	Make sure to include the comma, or the module will return an error. self:iterate(list, "check_output_base") self:iterate(list, "check_output_Venezuelan") self:iterate(list, "check_output_West_Surinamese") self:iterate(list, "check_output_East_Surinamese") end

return tests