Module:User:Geographyinitiative/tongyong/testcases
Jump to navigation
Jump to search
- This module lacks a documentation subpage. You may create it.
- Useful links: root page • root page’s subpages • links • transclusions • tested module • user page • user talk page • userspace
This is a private module sandbox of Geographyinitiative, for their own experimentation. Items in this module may be added and removed at Geographyinitiative's discretion; do not rely on this module's stability.
local p = require('Module:UnitTests')
local m_pron = require('Module:User:Geographyinitiative/tongyong')
function p:tongyong(text, expected)
self:equals(text, m_pron.py_tongyong(text), expected)
end
function p:test_tongyong()
local examples = {
{ 'qīnghǎi','cinghǎi' },
{ 'fújiàn','fwujiann' },
{ 'guǎngdōng','goangdong' },
{ 'héběi','herbeei' },
{ 'húnán','hwunan' },
{ 'zhèjiāng','jehjiang' },
{ 'nèiménggǔ','neymengguu' },
{ 'shǎnxī','shaanshi' },
{ 'xīnjiāng','shinjiang' },
{ 'xīzàng','shitzanq' },
{ 'sìchuān','syhchuan' },
}
self:iterate(examples, 'tongyong')
end