function p:test_error()
self:preprocess_equals_sandbox_many('{{#invoke:Error', 'error', {
-- Minimal parameter input
{'', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error}}', '{{Error}}')
self:preprocess_equals_preprocess( {'{{#invoke:Error|error}}', '{{Error}}<strong class="error"></strong>', {nowiki = 'yes'})},
{' ', '<strong class="error"> </strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|}}', '{{Error|}}')
{' ', '<strong class="error"> </strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error| }}') -- space  
{'{{!}}', '<strong class="error">|</strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}}}', '{{Error|{{!}}}}')
{'|tag=p', '<p class="error"></p>', {nowiki = 'yes'}},
self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}tag=p}}', '{{Error|{{!}}tag=p}}')
{'|message=', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=}}', '{{Error|message=}}')
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|message=}}', '{{Error|message<strong class=}}"error"></strong>', {nowiki = 'yes'})},
{'|message=|tag=p', '<p class="error"></p>', {nowiki = 'yes'}},
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=|tag=p}}', '{{Error|message=|tag=p}}')
{'|1', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=}}', '{{Error|1=}}')
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|1=}}', '{{Error|1<strong class=}}"error"></strong>', {nowiki = 'yes'})},
{'1=|tag=p', '<p class="error"></p>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=|tag=p}}', '{{Error|1=|tag=p}}')
-- Plain message
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message}}', '{{Error|Example<strong class="error message"></strong>'}}'),
self:preprocess_equals_preprocess( {'{{#invoke:Error|error| Example error message }}', '{{Error| Example<strong class="error message "></strong>'}}'),
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|message=Example error message}}', '{{Error|message<strong class="error">Example error message}}</strong>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|message = Example error message }}', '{{Error|message<strong class= "error">Example error message </strong>'}}'),
-- tag
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=p}}', '{{Error|Example<p class="error message|tag="></p}}>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|tag=p}}', '{{Error|tag<p class="error"></p>'}}'), -- no message
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message| tag = p}}', '{{Error|Example<p class="error message| tag = "></p}}>', {nowiki = 'yes'})},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=div}}', '{{Error|Example<div class="error message|tag="></div}}>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=div}}', '{{Error|Example<div class="error message|tag="></div}}>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=span}}', '{{Error|Example<span class="error message|tag="></span}}>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=adsf}}', '{{Error|Example<strong class="error message|tag=asdf"></strong>'}}'),
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=strong}}', '{{Error|Example<strong class="error message|tag="></strong}}>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag=�}}', '{{Error|Example<strong class="error message|tag=�"></strong>'}}'), -- ASCII nul
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag= }}', '{{Error|Example<strong class="error message|tag= "></strong>'}}'), -- nbsp
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example error message|tag={{!}}}}', '{{Error|Example<strong class="error message|tag={{!"></strong>'}}}}'),
-- Use numbered parameter
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|1=Example error message}}', '{{Error|1<strong class="error">Example error message}}</strong>')},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|1= Example error message }}', '{{Error|1<strong class= "error">Example error message </strong>'}}'),
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|Example = message}}', '{{Error|Example<strong class= message"error"></strong>'}}'),
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|1= Example = message }}', '{{Error|1<strong class= "error">Example = message </strong>'}}'),
-- More extreme input options
self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error| }}') -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|<br/>}}', '{{Error|<br/>}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|\n}}', '{{Error|\n}}', {nowiki = 'yes'})
self:preprocess_equals_preprocess('{{#invoke:Error|error|�}}', '{{Error|�}}') -- ASCII nul
-- Tricky input options
self:preprocess_equals_preprocess('{{#invoke:Error|error|0}}', '{{Error|0}}') -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|false}}', '{{Error|false}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|tag=tag}}', '{{Error|tag=tag}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1}}', '{{Error|1}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|true}}', '{{Error|true}}')
end
function p:test_error_sandbox()
-- Minimal parameter input
self:preprocess_equals_preprocess('{{#invoke:Error|error}}', '{{Error/sandbox}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error}}', '{{Error/sandbox}}', {nowiki = 'yes'})
self:preprocess_equals_preprocess('{{#invoke:Error|error|}}', '{{Error/sandbox|}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error/sandbox| }}') -- space  
self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}}}', '{{Error/sandbox|{{!}}}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|{{!}}tag=p}}', '{{Error/sandbox|{{!}}tag=p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=}}', '{{Error/sandbox|message=}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=}}', '{{Error/sandbox|message=}}', {nowiki = 'yes'})
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=|tag=p}}', '{{Error/sandbox|message=|tag=p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=}}', '{{Error/sandbox|1=}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=}}', '{{Error/sandbox|1=}}', {nowiki = 'yes'})
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=|tag=p}}', '{{Error/sandbox|1=|tag=p}}')
-- Plain message
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message}}', '{{Error/sandbox|Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error| Example error message }}', '{{Error/sandbox| Example error message }}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message=Example error message}}', '{{Error/sandbox|message=Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|message = Example error message }}', '{{Error/sandbox|message = Example error message }}')
-- tag
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=p}}', '{{Error/sandbox|Example error message|tag=p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|tag=p}}', '{{Error/sandbox|tag=p}}') -- no message
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message| tag = p}}', '{{Error/sandbox|Example error message| tag = p}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=div}}', '{{Error/sandbox|Example error message|tag=div}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=div}}', '{{Error/sandbox|Example error message|tag=div}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=span}}', '{{Error/sandbox|Example error message|tag=span}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=adsf}}', '{{Error/sandbox|Example error message|tag=asdf}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=strong}}', '{{Error/sandbox|Example error message|tag=strong}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag=�}}', '{{Error/sandbox|Example error message|tag=�}}') -- ASCII nul
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag= }}', '{{Error/sandbox|Example error message|tag= }}') -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example error message|tag={{!}}}}', '{{Error/sandbox|Example error message|tag={{!}}}}')
-- Use numbered parameter
self:preprocess_equals_preprocess('{{#invoke:Error|error|1=Example error message}}', '{{Error/sandbox|1=Example error message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1= Example error message }}', '{{Error/sandbox|1= Example error message }}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|Example = message}}', '{{Error/sandbox|Example = message}}')
self:preprocess_equals_preprocess('{{#invoke:Error|error|1= Example = message }}', '{{Error/sandbox|1= Example = message }}')
-- More extreme input options
{'| ', '<strong class="error"></strong>'}, -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error| }}', '{{Error/sandbox| }}') -- nbsp
{'|<br/>', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|<br/>}}', '{{Error/sandbox|<br/>}}')
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|\n}}', '{{Error<strong class="error"></sandbox|\n}}strong>', {nowiki = 'yes'})},
self:preprocess_equals_preprocess( {'{{#invoke:Error|error|�}}', '{{Error<strong class="error"></sandbox|�strong>'}}'), -- ASCII nul
-- Tricky input options
{'|0', '<strong class="error"></strong>'}, -- nbsp
self:preprocess_equals_preprocess('{{#invoke:Error|error|0}}', '{{Error/sandbox|0}}')
{'|false', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|false}}', '{{Error/sandbox|false}}')
{'|tag=tag', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|tag=tag}}', '{{Error/sandbox|tag=tag}}', {nowiki = 'yes'})
{'|1', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|1}}', '{{Error/sandbox|1}}')
{'|true', '<strong class="error"></strong>'},
self:preprocess_equals_preprocess('{{#invoke:Error|error|true}}', '{{Error/sandbox|true}}')
}, {nowiki=1})
end
|