Jump to content

Module:String/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dcoetzee (talk | contribs) at 03:45, 25 February 2013 (Create with just test_len). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Module:String]]. Click talk page to run tests.
local p = require('Module:UnitTests')
 
function p:test_len()
    self:preprocess_equals('{{#invoke:String|len| foo |}}', '5')
    self:preprocess_equals('{{#invoke:String|len|s= foo |}}', '3')
end
 
return p