FANDOM


-- <pre>Unit tests.  Click talk page to run tests. 
local mLinks =require("Dev:Links") 
local p ={
    main={ -- function name
        options={nowiki=true},
        tests = {
            preprocess_equals_many ={
                {'www.google.com', '[//www.google.com]'},
                {'g', '[[g]]'},
                {'wwwgoogle.com', '[[wwwgoogle.com]]'},
                {'Module:links|links', '[[Module:links|links]]'},
                {'http://dev.wikia.com|dev','[http://dev.wikia.com dev]'},
                {'jumbles','[[jumbles]]'},
                {'',''},
                {'www.purple.com|type=local','[[www.purple.com]]'},
                {'purple.com|purple|type=ext','[//purple.com purple]'},
                {'z|type=ext',''},
                {'tornadocom|type=ext',''},
                {'Category:Browse','[[:Category:Browse]]'},
                {'category:Browse','[[:category:Browse]]'},
                {'Ω.|type=ext',''},
                {'www.wikia.com/위키백과:대문','[//www.wikia.com/위키백과:대문]'},
            },
        },
    },
    link = {
        options={nowiki=true},
        tests = {
            equals= { 
                {'link with label',mLinks.link('http://dev.wikia.com','dev'),'[http://dev.wikia.com dev]',{nowiki=true}},
                {'ext link', mLinks.link('http://dev.wikia.com'),'[http://dev.wikia.com]'},
                {'local link with label',mLinks.link('g','test'), '[[g|test]]',{nowiki=true}},
                {'category link',mLinks.link('Category:Browse'),'[[:Category:Browse]]'},
                {'external link with ext param',mLinks.link('purple.com','purple',"ext"),'[//purple.com purple]'},
            },
        }
    }
}
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.