This is the test cases page for the module Module:Sandbox/isaacl/ExpandPageAbbreviation. Results of the test cases. |
-- Unit test cases for [[Module:Sandbox/isaacl/ExpandPageAbbreviation]].
-- Click on talk page to run tests.
local p = require('Module:UnitTests')
function p:test_WPN()
-- test abbreviations that are expanded
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:N}}',
"[[WP:N|Wikipedia's standards for inclusion]] (WP:N)")
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:NOTNEWSPAPER}}',
'[[WP:NOTNEWSPAPER|Wikipedia is not a place for news coverage]] (WP:NOTNEWSPAPER)')
-- test output cache by repeating some previous tests
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:N}}',
"[[WP:N|Wikipedia's standards for inclusion]] (WP:N)")
-- test abbreviations that are not expanded
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:NSPORTS}}',
'[[WP:NSPORTS]]')
end
return p
This is the test cases page for the module Module:Sandbox/isaacl/ExpandPageAbbreviation. Results of the test cases. |
-- Unit test cases for [[Module:Sandbox/isaacl/ExpandPageAbbreviation]].
-- Click on talk page to run tests.
local p = require('Module:UnitTests')
function p:test_WPN()
-- test abbreviations that are expanded
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:N}}',
"[[WP:N|Wikipedia's standards for inclusion]] (WP:N)")
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:NOTNEWSPAPER}}',
'[[WP:NOTNEWSPAPER|Wikipedia is not a place for news coverage]] (WP:NOTNEWSPAPER)')
-- test output cache by repeating some previous tests
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:N}}',
"[[WP:N|Wikipedia's standards for inclusion]] (WP:N)")
-- test abbreviations that are not expanded
self:preprocess_equals('{{#invoke:Sandbox/isaacl/ExpandPageAbbreviation|expand|WP:NSPORTS}}',
'[[WP:NSPORTS]]')
end
return p