Module:Autotranslate/testcases
< Module:Autotranslate
Jump to navigation
Jump to search
Revision as of 13:07, 25 May 2018 by Mediawiki>Jarekt
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