Difference between revisions of "Module:Error/testcases"
Jump to navigation
Jump to search
blackwiki>Mr. Stradivarius (more test cases) |
blackwiki>Mr. Stradivarius on tour (use preprocess_equals_preprocess) |
||
| Line 3: | Line 3: | ||
function p:test_error() | function p:test_error() | ||
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message}}', '{{Error|Example error message}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error| Example error message }}', '{{Error| Example error message }}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|message=Example error message}}', '{{Error|message=Example error message}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|message = Example error message }}', '{{Error|message = Example error message }}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=p}}', '{{Error|Example error message|tag=p}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message| tag = p}}', '{{Error|Example error message| tag = p}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=div}}', '{{Error|Example error message|tag=div}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=span}}', '{{Error|Example error message|tag=span}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=adsf}}', '{{Error|Example error message|tag=asdf}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=strong}}', '{{Error|Example error message|tag=strong}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|<br/>}}', '{{Error|<br/>}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|\n}}', '{{Error|\n}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|1=Example error message}}', '{{Error|1=Example error message}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|1= Example error message }}', '{{Error|1= Example error message }}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|�}}', '{{Error|�}}') -- ASCII nul |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error| }}') -- nbsp |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}}}', '{{Error|{{!}}}}') |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=�}}', '{{Error|Example error message|tag=�}}') -- ASCII nul |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag= }}', '{{Error|Example error message|tag= }}') -- nbsp |
| − | self: | + | self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag={{!}}}}', '{{Error|Example error message|tag={{!}}}}') |
end | end | ||
return p | return p | ||
Revision as of 04:53, 3 April 2013
Documentation for this module may be created at Module:Error/testcases/doc
-- Example Unit tests for [[Module:Error]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_error()
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message}}', '{{Error|Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error| Example error message }}', '{{Error| Example error message }}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=Example error message}}', '{{Error|message=Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message = Example error message }}', '{{Error|message = Example error message }}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=p}}', '{{Error|Example error message|tag=p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message| tag = p}}', '{{Error|Example error message| tag = p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=div}}', '{{Error|Example error message|tag=div}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=span}}', '{{Error|Example error message|tag=span}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=adsf}}', '{{Error|Example error message|tag=asdf}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=strong}}', '{{Error|Example error message|tag=strong}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|<br/>}}', '{{Error|<br/>}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|\n}}', '{{Error|\n}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=Example error message}}', '{{Error|1=Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1= Example error message }}', '{{Error|1= Example error message }}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|�}}', '{{Error|�}}') -- ASCII nul
self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error| }}') -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}}}', '{{Error|{{!}}}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=�}}', '{{Error|Example error message|tag=�}}') -- ASCII nul
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag= }}', '{{Error|Example error message|tag= }}') -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag={{!}}}}', '{{Error|Example error message|tag={{!}}}}')
end
return p