Fandom Developers Wiki
Advertisement

This module contains testcases for its parent module, Links.

See also[]


-- <nowiki>
-- Unit tests for [[Global Lua Modules/Links]].
-- @see [[Module talk:Links/testcases]]
return {
    main = {
        options = {
            mode   = 'invocation',
            nowiki = true
        },
        tests = {
            {
                '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 = {
            mode   = 'method',
            unpk   = true,
            nowiki = true
        },
        tests = {
            {
                {'http://dev.wikia.com','dev'},
                '[http://dev.wikia.com dev]'
            },
            {
                {'http://dev.wikia.com'},
                '[http://dev.wikia.com]'
            },
            {
                {'g','test'},
                '[[g|test]]'
            },
            {
                {'Category:Browse'},
                '[[:Category:Browse]]'
            },
            {
                {'purple.com', 'purple', 'ext'},
                '[//purple.com purple]'
            }
        }
    }
}
-- </nowiki>
Advertisement