มอดูล:Thai number/testcases

จากวิกิพีเดีย สารานุกรมเสรี
-- Example Unit tests for [[Module:Factorization]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_factor()
	for i = 0, 100 do
		self:preprocess_equals_preprocess('{{#invoke:Thai number|toWord|' .. tostring(i) .. '}}', '{{#invoke:Thai number/sandbox|toWord|' .. tostring(i) .. '}}')
	end
	for i = 100, 10000000, 100000 do
		self:preprocess_equals_preprocess('{{#invoke:Thai number|toWord|' .. tostring(i) .. '}}', '{{#invoke:Thai number/sandbox|toWord|' .. tostring(i) .. '}}')
		self:preprocess_equals_preprocess('{{#invoke:Thai number|toWord|' .. tostring(i + 1) .. '}}', '{{#invoke:Thai number/sandbox|toWord|' .. tostring(i + 1) .. '}}')
	end
end

return p