Jump to content

Module:Lang-hbs/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Czarkoff (talk | contribs) at 23:09, 15 June 2014 (Added two more testcases). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_convert()
    self:preprocess_equals('{{#invoke:hbs-cyr2lat|convert|text=Краљевина Југославија}}', 'Kraljevina Jugoslavija')
end

function p:test_concat_simple()
    self:preprocess_equals('{{#invoke:hbs-cyr2lat|concat|text=Краљевина Југославија}}', 'Краљевина Југославија, Kraljevina Jugoslavija')
end

function p:test_concat_full()
    self:preprocess_equals('{{#invoke:hbs-cyr2lat|concat|text=Краљевина Југославија|sep= or |swap=yes}}', 'Kraljevina Jugoslavija or Краљевина Југославија')
end

return p