Jump to content

Module:hak-pron/sandbox/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActual
test_IPA_conv:
Passedcinˋ senˋt͡sʰin⁵³ sen⁵³t͡sʰin⁵³ sen⁵³
Passedpiˋ zhunˊpʰi⁵³ t͡ʃun²⁴pʰi⁵³ t͡ʃun²⁴
Passedciuˋ guiˇt͡sʰiu⁵³ kui¹¹t͡sʰiu⁵³ kui¹¹
Passedgoˋ kiugko⁵³ kʰiuk⁵ko⁵³ kʰiuk⁵
Passedsinˋ ngiongsin⁵³ ŋioŋ⁵⁵sin⁵³ ŋioŋ⁵⁵
Passedboˋ long˖po⁵³ loŋ³³po⁵³ loŋ³³
Passedfungˋ siugˋfuŋ⁵³ siuk²fuŋ⁵³ siuk²
Passedfoˊ sanˋfo²⁴⁻³³ san⁵³fo²⁴⁻³³ san⁵³
Passedgieuˊ guˊkieu²⁴⁻³³ ku²⁴kieu²⁴⁻³³ ku²⁴
Passedshiuˊ boiˇʃiu²⁴⁻³³ poi¹¹ʃiu²⁴⁻³³ poi¹¹
Passedsiauˊ shodsiau²⁴⁻³³ ʃot⁵siau²⁴⁻³³ ʃot⁵
Passedzhimˊ teut͡ʃim²⁴⁻³³ tʰeu⁵⁵t͡ʃim²⁴⁻³³ tʰeu⁵⁵
Passedsiˊ cui˖si²⁴⁻³³ t͡sʰui³³si²⁴⁻³³ t͡sʰui³³
Passeddaˊ liabˋta²⁴⁻³³ liap²ta²⁴⁻³³ liap²
Passedseˇ goˋse¹¹ ko⁵³se¹¹ ko⁵³
Passedboiˇ ginˊpoi¹¹ kin²⁴poi¹¹ kin²⁴
Passedsheˇ gaiˇʃe¹¹ kai¹¹ʃe¹¹ kai¹¹
Passedseuˇ ngiugseu¹¹ ŋiuk⁵seu¹¹ ŋiuk⁵
Passedlaiˇ erlai¹¹ ə⁵⁵lai¹¹ ə⁵⁵
Passedchauˇ mui˖t͡ʃʰau¹¹ mui³³t͡ʃʰau¹¹ mui³³
Passedbiongˇ hogˋpioŋ¹¹ hok²pioŋ¹¹ hok²
Passedhag gaˋhak⁵⁻² ka⁵³hak⁵⁻² ka⁵³
Passedded ziongˊtet⁵⁻² t͡sioŋ²⁴tet⁵⁻² t͡sioŋ²⁴
Passedrhid banˇʒit⁵⁻² pan¹¹ʒit⁵⁻² pan¹¹
Passedfad gogfat⁵⁻² kok⁵fat⁵⁻² kok⁵
Passedab erap⁵⁻² ə⁵⁵ap⁵⁻² ə⁵⁵
Passedfab tu˖fap⁵⁻² tʰu³³fap⁵⁻² tʰu³³
Passedchud ngibˋt͡ʃʰut⁵⁻² ŋip²t͡ʃʰut⁵⁻² ŋip²
Passedngien dungˋŋien⁵⁵ tuŋ⁵³ŋien⁵⁵ tuŋ⁵³
Passednam ziiˊnam⁵⁵ t͡sɨ²⁴nam⁵⁵ t͡sɨ²⁴
Passedki guaiˇkʰi⁵⁵ kuai¹¹kʰi⁵⁵ kuai¹¹
Passedfung sedfuŋ⁵⁵ set⁵fuŋ⁵⁵ set⁵
Passedngiau pinŋiau⁵⁵ pʰin⁵⁵ŋiau⁵⁵ pʰin⁵⁵
Passedpiang ti˖pʰiaŋ⁵⁵ tʰi³³pʰiaŋ⁵⁵ tʰi³³
Passednung rhogˋnuŋ⁵⁵ ʒok²nuŋ⁵⁵ ʒok²

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

function p:test_IPA_conv()
	local examples = {
        { "cinˋ senˋ", "Hailu", "t͡sʰin⁵³ sen⁵³" },
        { "piˋ zhunˊ", "Hailu", "pʰi⁵³ t͡ʃun²⁴" },
        { "ciuˋ guiˇ", "Hailu", "t͡sʰiu⁵³ kui¹¹" },
        { "goˋ kiug", "Hailu", "ko⁵³ kʰiuk⁵" },
        { "sinˋ ngiong", "Hailu", "sin⁵³ ŋioŋ⁵⁵" },
        { "boˋ long˖", "Hailu", "po⁵³ loŋ³³" },
        { "fungˋ siugˋ", "Hailu", "fuŋ⁵³ siuk²" },
        { "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²" },
        { "seˇ goˋ", "Hailu", "se¹¹ ko⁵³" },
        { "boiˇ ginˊ", "Hailu", "poi¹¹ kin²⁴" },
        { "sheˇ gaiˇ", "Hailu", "ʃe¹¹ kai¹¹" },
        { "seuˇ ngiug", "Hailu", "seu¹¹ ŋiuk⁵" },
        { "laiˇ er", "Hailu", "lai¹¹ ə⁵⁵" },
        { "chauˇ mui˖", "Hailu", "t͡ʃʰau¹¹ mui³³" },
        { "biongˇ hogˋ", "Hailu", "pioŋ¹¹ hok²" },
        { "hag gaˋ", "Hailu", "hak⁵⁻² ka⁵³" },
        { "ded ziongˊ", "Hailu", "tet⁵⁻² t͡sioŋ²⁴" },
        { "rhid banˇ", "Hailu", "ʒit⁵⁻² pan¹¹" },
        { "fad gog", "Hailu", "fat⁵⁻² kok⁵" },
        { "ab er", "Hailu", "ap⁵⁻² ə⁵⁵" },
        { "fab tu˖", "Hailu", "fap⁵⁻² tʰu³³" },
        { "chud ngibˋ", "Hailu", "t͡ʃʰut⁵⁻² ŋip²" },
        { "ngien dungˋ", "Hailu", "ŋien⁵⁵ tuŋ⁵³" },
        { "nam ziiˊ", "Hailu", "nam⁵⁵ t͡sɨ²⁴"},
        { "ki guaiˇ", "Hailu", "kʰi⁵⁵ kuai¹¹"},
        { "fung sed", "Hailu", "fuŋ⁵⁵ set⁵"},
        { "ngiau pin", "Hailu", "ŋiau⁵⁵ pʰin⁵⁵"},
        { "piang ti˖", "Hailu", "pʰiaŋ⁵⁵ tʰi³³"},
        { "nung rhogˋ", "Hailu", "nuŋ⁵⁵ ʒok²" },
	}
	self:iterate(examples, function (self, text, dialect, expected)
		self:equals(text, m_pron.hrs_to_ipa(text, dialect), expected)
	end)
end

return p