Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Find country/testcases

From Wikipedia, the free encyclopedia
-- Unit tests for [[Module:Find country]]. Click talk page to run tests.
local p = require('Module:UnitTests')

-- Example unit test.
-- function p:test_main()
	--  self:preprocess_equals('{{#invoke:Find country |main|"France is lovely at this time of year "}}') 
-- end
function p:test_main()
	self:preprocess_equals_many('{{#invoke:Find country|main|string=', '}}', {
		{"Find", ""};
		{"France is lovely at this time of year ", "France"};
		{"It is found in Zimbabwe and South Africa.", "South Africa"};
		{"Bošnjane is a village in the municipality of Varvarin, Serbia. ", "Serbia"};
		{"Find country/testcases", "Find country/testcases"};
		{"The Jamaica Rural Police Force (JRPF), also", "Jamaica"};
	})
	self:preprocess_equals('{{#invoke:Find country |main|}}', 'Find country/testcases') 
end

return p