Module:Official website/testcases
Appearance
![]() | This is the test cases page for the module Module:Official website. Results of the test cases. |
local p = require('Module:UnitTests')
function p:test1()
self:preprocess_equals_many('{{#invoke:Official website|main', '}}', {
{
'|url=example.com',
'<span class="official-website"><span class="url">[http://example.com Official website]</span></span>'
},
{
'|url=http://example.com',
'<span class="official-website"><span class="url">[http://example.com Official website]</span></span>'
},
{
'|url=http://example.com/',
'<span class="official-website"><span class="url">[http://example.com/ Official website]</span></span>'
},
{
'|url=https://example.com',
'<span class="official-website"><span class="url">[https://example.com Official website]</span></span>'
},
{
'|url=http://example.com |name=Example website',
'<span class="official-website"><span class="url">[http://example.com Example website]</span></span>'
},
{
'|url=http://example.com |format=flash',
'<span class="official-website"><span class="url">[http://example.com Official website]</span></span> <span style="font-size:0.95em; font-size:90%; color:#555">(Requires [[Adobe Flash Player]])</span>'
},
{
'|url=http://example.com |mobile=http://m.example.com',
'<span class="official-website"><span class="url">[http://example.com Official website]</span></span> (<span class="url">[http://m.example.com Mobile]</span>)'
},
} )
end
return p