Jump to content

Module:Ustring/testcases: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
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'
(No difference)

Revision as of 11:20, 14 November 2021

-- 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