Difference between revisions of "Module:Check for unknown parameters/testcases"

From blackwiki
Jump to navigation Jump to search
blackwiki>Gonnym
(Created page with '-- Unit tests for Module:Check for unknown parameters. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_01_1_check_live()...')
 
blackwiki>Gonnym
Line 3: Line 3:
  
 
function p:test_01_1_check_live()
 
function p:test_01_1_check_live()
self:preprocess_equals_many('{{#invoke:Check for unknown parameters|check', '}}', {
+
self:preprocess_equals_many('{{Module talk:Check for unknown parameters/testcases/template call|', '}}', {
{"|arg1|arg2|arg3|argN", ""},
+
{"arg1 | args2 | name | height | weight | website", "Unknown 1 = name ,Unknown 2 = height ,Unknown 3 = weight ,Unknown 4 = website,"},
 
})
 
})
 
end
 
end
  
 
function p:test_01_2_check_sandbox()
 
function p:test_01_2_check_sandbox()
self:preprocess_equals_many('{{#invoke:Check for unknown parameters/sandbox|check', '}}', {
+
self:preprocess_equals_many('{{Module talk:Check for unknown parameters/testcases/template call|', '}}', {
{"|arg1|arg2|arg3|argN", ""},
+
{"arg1 | args2 | name | height | weight | website", "Unknown 1 = name ,Unknown 2 = height ,Unknown 3 = weight ,Unknown 4 = website,"},
 
})
 
})
 
end
 
end
  
 
return p
 
return p

Revision as of 19:02, 29 December 2019

Documentation for this module may be created at Module:Check for unknown parameters/testcases/doc

-- Unit tests for [[Module:Check for unknown parameters]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_01_1_check_live()
	self:preprocess_equals_many('{{Module talk:Check for unknown parameters/testcases/template call|', '}}', {
	{"arg1 | args2 | name | height | weight | website", "Unknown 1 = name ,Unknown 2 = height ,Unknown 3 = weight ,Unknown 4 = website,"},
	})
end

function p:test_01_2_check_sandbox()
	self:preprocess_equals_many('{{Module talk:Check for unknown parameters/testcases/template call|', '}}', {
	{"arg1 | args2 | name | height | weight | website", "Unknown 1 = name ,Unknown 2 = height ,Unknown 3 = weight ,Unknown 4 = website,"},
	})
end

return p