Jump to content

Module:Ustring/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GKFX (talk | contribs) at 11:20, 14 November 2021 (Created page with '-- Unit tests for Module:Ustring. Click talk page to run tests. local p = require('Module:UnitTests') -- Test sub function function p:test_sub() self:preprocess_equals('{{#invoke:ustring| sub | hello | 1 | 3 }}', ' he') self:preprocess_equals('{{#invoke:ustring| sub | s1 = hello | 1 | 3 }}', 'hel') end return p'). 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:Ustring]]. Click talk page to run tests.
local p = require('Module:UnitTests')

-- Test sub function
function p:test_sub()
	self:preprocess_equals('{{#invoke:ustring| sub | hello | 1 | 3 }}', ' he')
	self:preprocess_equals('{{#invoke:ustring| sub | s1 = hello | 1 | 3 }}', 'hel')
end

return p