Module:Redirect/testcases
< Module:Redirect
Jump to navigation
Jump to search
Revision as of 15:54, 18 March 2013 by test>Wnt (that one is down to the crummy script browser font.)
Documentation for this module may be created at Module:Redirect/testcases/doc
-- Unit tests for [[Module:Redirect]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_main()
self:preprocess_equals('{{#invoke:Redirect|main|WP:AFC}}', 'Wikipedia:Articles for creation')
self:preprocess_equals('{{#invoke:Redirect|main| WP:AFC }}', 'Wikipedia:Articles for creation')
self:preprocess_equals('{{#invoke:Redirect|main| }}', '')
self:preprocess_equals('{{#invoke:Redirect|main|File talk:twenty-seven species of furry marmot grooving in a Vandal}}', '[[Module:redirect]] error: File not found (id=0): - [[File talk:twenty-seven species of furry marmot grooving in a Vandal]]')
end
return p