Jump to content

Module:Toolbar/testcases

From Wikipedia, the free encyclopedia
local p = require('Module:UnitTests')
 
function p:test_basic_arg1()
    self:preprocess_equals_preprocess_many('{{toolbar/sandbox|', '}}', '{{toolbar|', '}}', {
        {''},
        {'foo'},
        {'foo|bar'},
        {'foo|bar|baz'},
        {'foo||baz'},
        {'foo|   |baz'},
        {'foo|  \n\n  |baz'},
        {'foo|bar|baz|8='},
        {'foo|bar|baz|8=  '},
        {'  foo  '},
        {'3=foo'},
        {'3=  foo  '},
        {'foo|bar|class=someclass'},
        {'foo|bar|class='},
        {'foo|bar|  class  =   '},
        {'foo|bar|class=  \n  '},
        {'foo|bar|style=somestyle:somevalue;'},
        {'foo|bar|style='},
        {'foo|bar|class=  someclass  '},
        {'foo|bar|style=  somestyle: somevalue;  '},
        {'foo|bar|class=someclass|style=somestyle:somevalue;'},
        {'foo|bar|seperator=comma'},
        {'foo|bar|seperator=asdf'},
        {'foo|bar|seperator=漢字'},
        {'foo|bar|seperator='},
        {'foo|bar|seperator=     '},
        {'foo|bar|  separator  =   '},
        {'foo|bar|漢字'},
        {'foo|bar|'},
        {'foo|bar|�'},
        {'foo|bar| '},
        {'foo|bar|¬'},
        {'foo|bar|{{#expr:5/5}}'},
        {'foo|bar| '},
        {'foo|bar|{{#expr:0/5}}'},
        {'foo|bar|<br/>'},
        {'foo|bar|\n'},
        {'foo|bar|true'},
        {'foo|bar|false'},
        {'foo|bar|span=no'},
    }, {nowiki='yes'})
end

return p