Jump to content

Module:IPA symbol/sandbox/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DePiep (talk | contribs) at 08:44, 20 July 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Example Unit tests for [[Module:IPAsymbol]]. Click talk page to run tests.
local p = require('Module:UnitTests')
--     self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|}}', '{{IPAsym|}}')

function p:test_latinalphabet()
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|p}}', '{{IPAsym|p}}')
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|p}}', '{{IPAsym|p}}')
end

function p:test_IPA_extremes()
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|}}', '{{IPAsym|}}')
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main}}', '{{IPAsym}}')
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|xyz}}', '{{IPAsym|xyz}}')
end

function p:test_erroroptions()
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|m}}', '{{IPAsym|}}')
end

function p:IPA_symbols()
    self:preprocess_equals_preprocess('{{#invoke:IPAsymbol/sandbox|main|ʘ}}', '{{IPAsym|ʘ}}')
end

return p