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:Error/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:Error]]. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_error() self:preprocess_equals_sandbox_many('{{#invoke:Error', 'error', { -- Minimal parameter input {'', '<strong class="error"></strong>'}, {'', '<strong class="error"></strong>', {nowiki = 'yes'}}, {' ', '<strong class="error"> </strong>'}, {' ', '<strong class="error"> </strong>'}, {'{{!}}', '<strong class="error">|</strong>'}, {'|tag=p', '<p class="error"></p>', {nowiki = 'yes'}}, {'|message=', '<strong class="error"></strong>'}, {'|message=', '<strong class="error"></strong>', {nowiki = 'yes'}}, {'|message=|tag=p', '<p class="error"></p>', {nowiki = 'yes'}}, {'|1', '<strong class="error"></strong>'}, {'1=', '<strong class="error"></strong>', {nowiki = 'yes'}}, {'1=|tag=p', '<p class="error"></p>'}, -- Plain message {'|Example error message', '<strong class="error"></strong>'}, {'| Example error message ', '<strong class="error"></strong>'}, {'|message=Example error message', '<strong class="error">Example error message</strong>'}, {'|message = Example error message ', '<strong class="error">Example error message</strong>'}, -- tag {'|Example error message|tag=p', '<p class="error"></p>'}, {'|tag=p', '<p class="error"></p>'}, -- no message {'|Example error message| tag = p', '<p class="error"></p>', {nowiki = 'yes'}}, {'|Example error message|tag=div', '<div class="error"></div>'}, {'|Example error message|tag=div', '<div class="error"></div>'}, {'|Example error message|tag=span', '<span class="error"></span>'}, {'|Example error message|tag=adsf', '<strong class="error"></strong>'}, {'|Example error message|tag=strong', '<strong class="error"></strong>'}, {'|Example error message|tag=�', '<strong class="error"></strong>'}, -- ASCII nul {'|Example error message|tag= ', '<strong class="error"></strong>'}, -- nbsp {'|Example error message|tag={{!}}', '<strong class="error"></strong>'}, -- Use numbered parameter {'1=Example error message', '<strong class="error">Example error message</strong>'}, {'1= Example error message ', '<strong class="error">Example error message</strong>'}, {'|Example = message', '<strong class="error"></strong>'}, {'1= Example = message ', '<strong class="error">Example = message</strong>'}, -- More extreme input options {'| ', '<strong class="error"></strong>'}, -- nbsp {'|<br/>', '<strong class="error"></strong>'}, {'|\n', '<strong class="error"></strong>', {nowiki = 'yes'}}, {'|�', '<strong class="error"></strong>'}, -- ASCII nul -- Tricky input options {'|0', '<strong class="error"></strong>'}, -- nbsp {'|false', '<strong class="error"></strong>'}, {'|tag=tag', '<strong class="error"></strong>'}, {'|1', '<strong class="error"></strong>'}, {'|true', '<strong class="error"></strong>'}, }, {nowiki=1}) 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:Error/testcases/doc
(
edit
)