Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Suppress categories/testcases
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
-- Unit tests for [[Module:Suppress categories]]. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_main() self:preprocess_equals_many('{{#invoke:Suppress categories|main|', '}}', { {'foo', 'foo'}, {'foo[[Category:Some category]]', 'foo'}, {'foo[[Category:Some category]]bar[[Category:Another category]]', 'foobar'}, {'foo{{{some_parameter|[[Category:Bar]]}}}', 'foo'}, {'foo[[Category:Bad ca[]tegory link]]', 'foo[[Category:Bad ca[]tegory link]]'}, {'foo[[:Category:Colon trick]]', 'foo[[:Category:Colon trick]]'}, {'foo[[Category:Piped link|bar]]', 'foo'}, {'foo[[Category:Piped link|ba[]r]]', 'foo'}, {'foo[[non-category link]]', 'foo[[non-category link]]'}, {'foo[[ Category : Some category with spaces ]]', 'foo'}, }, {nowiki = 'yes'}) end function p:test_nested() self:preprocess_equals_many('{{#invoke:Suppress categories|main|', '}}', { {'[[Category:Fo[[Category:Bar]]o]]', '[[Category:Fo<span style="display: none;">[[]]</span>o]]'}, {'[[Category:Foo|b[[Category:Baz]]ar]]', '[[Category:Foo|b<span style="display: none;">[[]]</span>ar]]'}, {'[[Category:Foo|ba[[Category:Baz|ba[[Category:Foobar|Bazbat]]m]]r]]', '[[Category:Foo|ba[[Category:Baz|ba<span style="display: none;">[[]]</span>m]]r]]'}, {'[[Category:Foo|b[a[[Category:Baz|bam]]r]]', '[[Category:Foo|b[a<span style="display: none;">[[]]</span>r]]'} }, {nowiki = 'yes'}) end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Suppress categories/testcases/doc
(
edit
)