Module:hak-pron/sandbox/testcases

local p = require("Module:UnitTests") local m_pron = require("Module:hak-pron/sandbox")

function p:test_IPA_conv local examples = { { "hag gaˋ", "Hailu", "hak⁵⁻² ka⁵³" }, { "foˊ sanˋ", "Hailu", "fo²⁴⁻³³ san⁵³" }, { "gieuˊ guˊ", "Hailu", "kieu²⁴⁻³³ ku²⁴" }, { "shiuˊ boiˇ", "Hailu", "ʃiu²⁴⁻³³ poi¹¹" }, { "siauˊ shod", "Hailu", "siau²⁴⁻³³ ʃot⁵" }, { "zhimˊ teu", "Hailu", "t͡ʃim²⁴⁻³³ tʰeu⁵⁵" }, { "siˊ cui˖", "Hailu", "si²⁴⁻³³ t͡sʰui³³" }, { "daˊ liabˋ", "Hailu", "ta²⁴⁻³³ liap²" }, }	self:iterate(examples, function (self, text, dialect, expected)		self:equals(text, m_pron.hrs_to_ipa(text, dialect), expected)	end) end

return p