词条 | Module:Sandbox/Lfdder/testtpl |
释义 | -- Unit tests for Bananas. Click talk page to run tests. local p = require('Module:UnitTests/sandbox2') function p:test_valid() self:preprocess_equals_preprocess('{{R from alternative language/sandbox}}', '{{R from alternative language}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|fr}}', '{{R from alternative language|fr}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|to=fr}}', '{{R from alternative language|to=fr}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|2=fr}}', '{{R from alternative language|2=fr}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox||fr}}', '{{R from alternative language||fr}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|fr|to=ja}}', '{{R from alternative language|fr|to=ja}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|fr|2=ja}}', '{{R from alternative language|fr|2=ja}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|fr|ja}}', '{{R from alternative language|fr|ja}}') end function p:test_half_valid() self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid}}', '{{R from alternative language|from_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|to=to_invalid}}', '{{R from alternative language|to=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|2=to_invalid}}', '{{R from alternative language|2=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox||to_invalid}}', '{{R from alternative language||to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|to=ja}}', '{{R from alternative language|from_invalid|to=ja}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|2=ja}}', '{{R from alternative language|from_invalid|2=ja}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|ja}}', '{{R from alternative language|from_invalid|ja}}') end function p:test_invalid() self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid}}', '{{R from alternative language|from_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|to=to_invalid}}', '{{R from alternative language|to=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|2=to_invalid}}', '{{R from alternative language|2=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox||to_invalid}}', '{{R from alternative language||to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|to=to_invalid}}', '{{R from alternative language|from_invalid|to=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|2=to_invalid}}', '{{R from alternative language|from_invalid|2=to_invalid}}') self:preprocess_equals_preprocess('{{R from alternative language/sandbox|from_invalid|to_invalid}}', '{{R from alternative language|from_invalid|to_invalid}}') end return p |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。