Module:User:Justinrleung/testcases
Appearance
- The following documentation is located at Module:User:Justinrleung/testcases/documentation. [edit] Categories were auto-generated by Module:documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
This is the unit-testing module for Module:User:Justinrleung.
2 of 33 tests failed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
Script error during testing: Module:links:700: The first argument to the function language_link must be a table. See Module:links/documentation for more information.stack traceback: [C]: ? [C]: in function 'error' Module:links:700: in function <Module:links:698> (tail call): ? Module:User:Justinrleung/testcases:32: in function 'link' Module:User:Justinrleung/testcases:36: in function <Module:User:Justinrleung/testcases:35> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:891: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
![]() | pfs=kîm-ngit | gim´ ngid` | gim´ ngid` | |
![]() | pfs=Kîm-ngit | gim´ ngid` | gim´ ngid` | |
![]() | pfs=Mâ-lòi-sî-á | ma´ loiˇ xi´ a` | ma´ loiˇ xi´ a` | |
![]() | pfs=ngòan | nguanˇ | nguanˇ | |
![]() | pfs=ngài | ngaiˇ | ngaiˇ | |
![]() | pfs=ngì | ngiˇ | ngiˇ | |
![]() | pfs=phang | pang | pang | |
![]() | pfs=pha̍k | pag | pag | |
![]() | pfs=sṳ̀n | siinˇ | siinˇ | |
![]() | pfs=sṳ̍t | siid | siid | |
![]() | pfs=sṳt | siid` | siid` | |
![]() | pfs=yèn | ienˇ | ienˇ | |
![]() | pfs=yit | id` | id` |
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
Script error during testing: Module:User:Justinrleung/testcases:60: attempt to call field 'poj_check_invalid' (a nil value)stack traceback: [C]: in function 'poj_check_invalid' Module:User:Justinrleung/testcases:60: in function 'poj_check_invalid' Module:User:Justinrleung/testcases:64: in function <Module:User:Justinrleung/testcases:63> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:891: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
![]() | tōngyòng pīnyīn | tongyòng pinyin | tongyòng pinyin | |
![]() | xiǎo | siǎo | siǎo | |
![]() | māma | mamå | mamå | |
![]() | xióngmāo | syóngmao | syóngmao | |
![]() | zhǎngguǎn | jhǎngguǎn | jhǎngguǎn | |
![]() | qú | cyú | cyú | |
![]() | lǔ | lǔ | lǔ | |
![]() | lǚ | lyǔ | lyǔ | |
![]() | fēnglàng | fonglàng | fonglàng | |
![]() | Qīnghǎi | Cinghǎi | Cinghǎi | |
![]() | Fújiàn | Fújiàn | Fújiàn | |
![]() | Guǎngdōng | Guǎngdong | Guǎngdong | |
![]() | Héběi | Héběi | Héběi | |
![]() | Húnán | Húnán | Húnán | |
![]() | Zhèjiāng | Jhèjiang | Jhèjiang | |
![]() | Nèiménggǔ | Nèiménggǔ | Nèiménggǔ | |
![]() | Shǎnxī | Shǎnsi | Shǎnsi | |
![]() | Xīnjiāng | Sinjiang | Sinjiang | |
![]() | Xīzàng | Sizàng | Sizàng | |
![]() | Sìchuān | Sìhchuan | Sìhchuan |
local p = require('Module:UnitTests')
local m = require('Module:User:Justinrleung')
function p:py_tongyong(text, expected)
self:equals(text, m.py_tongyong(text), expected)
end
function p:test_py_tongyong(text, expected)
self:py_tongyong("tōngyòng pīnyīn", "tongyòng pinyin")
self:py_tongyong("xiǎo", "siǎo")
self:py_tongyong("māma", "mamå")
self:py_tongyong("xióngmāo", "syóngmao")
self:py_tongyong("zhǎngguǎn", "jhǎngguǎn")
self:py_tongyong("qú", "cyú")
self:py_tongyong("lǔ", "lǔ")
self:py_tongyong("lǚ", "lyǔ")
self:py_tongyong("fēnglàng", "fonglàng")
self:py_tongyong("Qīnghǎi", "Cinghǎi")
self:py_tongyong("Fújiàn", "Fújiàn")
self:py_tongyong("Guǎngdōng", "Guǎngdong")
self:py_tongyong("Héběi", "Héběi")
self:py_tongyong("Húnán", "Húnán")
self:py_tongyong("Zhèjiāng", "Jhèjiang")
self:py_tongyong("Nèiménggǔ", "Nèiménggǔ")
self:py_tongyong("Shǎnxī", "Shǎnsi")
self:py_tongyong("Xīnjiāng", "Sinjiang")
self:py_tongyong("Xīzàng", "Sizàng")
self:py_tongyong("Sìchuān", "Sìhchuan")
end
function p:link(text, expected)
self:equals(text, m.link(text), expected)
end
function p:test_link()
self:link('text', '')
end
function p:pfs_to_hrs(text, expected)
self:equals(text, m.pfs_to_hrs(text), expected)
end
function p:test_pfs_to_hrs()
self:pfs_to_hrs('pfs=kîm-ngit', 'gim´ ngid`')
self:pfs_to_hrs('pfs=Kîm-ngit', 'gim´ ngid`')
self:pfs_to_hrs('pfs=Mâ-lòi-sî-á', 'ma´ loiˇ xi´ a`')
self:pfs_to_hrs('pfs=ngòan', 'nguanˇ')
self:pfs_to_hrs('pfs=ngài', 'ngaiˇ')
self:pfs_to_hrs('pfs=ngì', 'ngiˇ')
self:pfs_to_hrs('pfs=phang', 'pang')
self:pfs_to_hrs('pfs=pha̍k', 'pag')
self:pfs_to_hrs('pfs=sṳ̀n', 'siinˇ')
self:pfs_to_hrs('pfs=sṳ̍t', 'siid')
self:pfs_to_hrs('pfs=sṳt', 'siid`')
self:pfs_to_hrs('pfs=yèn', 'ienˇ')
self:pfs_to_hrs('pfs=yit', 'id`')
end
function p:poj_check_invalid(text, expected)
self:equals(text, m.poj_check_invalid(text), expected)
end
function p:test_poj_check_invalid()
self:poj_check_invalid('khoê', 'khôe')
self:poj_check_invalid('khoâ', 'khôa')
end
return p