Jump to content

Module:Toolbar/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 15:08, 11 June 2013 (add nowiki). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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  '},
        {'3=foo'},
        {'3=  foo  '},
        {'foo|bar|class=someclass'},
        {'foo|bar|style=somestyle:somevalue;'},
        {'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|漢字'},
        {'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'},
    }, {nowiki='yes'})
end

return p