Difference between revisions of "Module:Autotranslate/testcases"
Jump to navigation
Jump to search
Mediawiki>Jarekt |
m (1 revision imported) |
Latest revision as of 19:05, 21 January 2022
no documentation yet
-- Unit tests for [[Module:Autotranslate]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_autotranslate()
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Template:Autotranslate/test | lang = en }}', '[[Template:Autotranslate/test/en]] (lang=en) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Template:Autotranslate/test | lang = fr }}', '[[Template:Autotranslate/test/en]] (lang=fr) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Template:Autotranslate/test | lang = pl }}', '[[Template:Autotranslate/test/pl]] (lang=pl) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Template:Autotranslate/test | lang = szl }}', '[[Template:Autotranslate/test/pl]] (lang=szl) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Autotranslate/test | lang = szl }}', '[[Template:Autotranslate/test/pl]] (lang=szl) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Autotranslate/test | lang = an }}', '[[Template:Autotranslate/test/es]] (lang=an) was called')
self:preprocess_equals('{{#invoke: Autotranslate | autotranslate | base = Autotranslate/test | lang = an | text=hello | 1=arg #1 }}', '[[Template:Autotranslate/test/es]] (1=arg #1, lang=an, text=hello) was called')
end
return p