Modul:String2/testtilfeller


-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_matchAny()
	self:preprocess_equals_sandbox_many('{{#invoke:String2', 'ucfirst', {

    },{nowiki=1})
    self:preprocess_equals_sandbox_many('{{#invoke:String2', 'ucfirst', {
        {'*test', '\n*Test'},
        {'[[test]]', '[[Test]]'},
        {'[[test|pipetest]]', '[[test|Pipetest]]'},
        {'32nd', '32nd'},
        {'3 ×', '3 ×'},
        {'<li>test</li>', '<li>Test</li>'},
        {'1900 &ndash; 2000', '1900 &ndash; 2000'},
    })
    self:preprocess_equals_sandbox_many('{{#invoke:String2','matchAny', {
    	{'123|abc|source=adc 123', '1'},
    	{'123|abc|source=adc 124', ''},
    	{'123|abc|source=abc 124', '2'},
     },{nowiki=1})
end

return p