League of Legends Wiki

Want to contribute to this wiki?
Sign up for an account, and get started!
You can even turn off ads in your preferences.

Come join the LoL Wiki community Discord server!

READ MORE

League of Legends Wiki
Advertisement

Documentation for this module may be created at Module:Sandbox/DutyS12345/testcases/doc

-- <pre>
return {
    striplinks = {
        options = {
            mode = 'invocation',
        },
        tests = {
            {
                '[[User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                '[[User:DutyS12345|T]]',
                'T'
            },
            {
                '[[User:DutyS12345|DutyS12345]]',
                'DutyS12345'
            },
            {
                '[[  User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[  :User:DutyS12345]]',
                ' :User:DutyS12345'
            },
            {
                '[[:User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                 '[[  : User:DutyS12345]]',
                 '  : User:DutyS12345'
            },
            {
                '[[: User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[:]]',
                '[[:]]'
            },
            {
                '[[ :]]',
                ' :'
            },
            {
                '[[:  l]]',
                '  l'
            },
            {
                '[[ : ]]',
                ' : '
            },
            {
                '[[ : l]]',
                ' : l'
            },
            {
                '[[ : l ]]',
                ' : l '
            },
            {
                '[[  :  l  ]]',
                '  :  l  '
            },
            {
                '[[:]  l  ]]',
                '[[:]  l  ]]'
            },
            {
                '[[:| ]]',
                '[[:| ]]'
            },
            {
                '[[: | l ]]',
                '[[: | l ]]'
            }
        }
    },
    striplinks2 = {
        options = {
            mode = 'invocation',
        },
        tests = {
            {
                '[[User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                '[[User:DutyS12345|T]]',
                'T'
            },
            {
                '[[User:DutyS12345|DutyS12345]]',
                'DutyS12345'
            },
            {
                '[[  User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[  :User:DutyS12345]]',
                ' :User:DutyS12345'
            },
            {
                '[[:User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                 '[[  : User:DutyS12345]]',
                 '  : User:DutyS12345'
            },
            {
                '[[: User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[:]]',
                '[[:]]'
            },
            {
                '[[ :]]',
                ' :'
            },
            {
                '[[:  l]]',
                '  l'
            },
            {
                '[[ : ]]',
                ' : '
            },
            {
                '[[ : l]]',
                ' : l'
            },
            {
                '[[ : l ]]',
                ' : l '
            },
            {
                '[[  :  l  ]]',
                '  :  l  '
            },
            {
                '[[:]  l  ]]',
                '[[:]  l  ]]'
            },
            {
                '[[:| ]]',
                '[[:| ]]'
            },
            {
                '[[: | l ]]',
                '[[: | l ]]'
            }
        }
    },
    striplinkstest = {
        options = {
            mode = 'invocation',
        },
        tests = {
            {
                '[[User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                '[[User:DutyS12345|T]]',
                'T'
            },
            {
                '[[User:DutyS12345|DutyS12345]]',
                'DutyS12345'
            },
            {
                '[[  User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[  :User:DutyS12345]]',
                ' :User:DutyS12345'
            },
            {
                '[[:User:DutyS12345]]',
                'User:DutyS12345'
            },
            {
                 '[[  : User:DutyS12345]]',
                 '  : User:DutyS12345'
            },
            {
                '[[: User:DutyS12345]]',
                ' User:DutyS12345'
            },
            {
                '[[:]]',
                '[[:]]'
            },
            {
                '[[ :]]',
                ' :'
            },
            {
                '[[:  l]]',
                '  l'
            },
            {
                '[[ : ]]',
                ' : '
            },
            {
                '[[ : l]]',
                ' : l'
            },
            {
                '[[ : l ]]',
                ' : l '
            },
            {
                '[[  :  l  ]]',
                '  :  l  '
            },
            {
                '[[:]  l  ]]',
                '[[:]  l  ]]'
            },
            {
                '[[:| ]]',
                '[[:| ]]'
            },
            {
                '[[: | l ]]',
                '[[: | l ]]'
            }
        }
    },
    querychamps = {
        options = {
            mode = 'invocation',
        },
        tests = {
            {
                'stat=resource|value=Energy',
                'Akali,Kennen,Lee Sin,Shen,Zed'
            },
        }
    },
    queryoptions = {
        options = {
            mode = 'invocation',
        }  ,
        tests = {
            {
                'stat=resource',
                'Courage,Energy,Ferocity,Flow,Fury,Grit,Health,Heat,Mana,None,Rage,Shield'
            }
        }
    },
    testtbl_concat = { -- member being tested
        options = { -- <= options 
            mode = 'method', -- <= test mode
            nowiki = true
        },
        tests = {
        -- Parameters | Expected result | Optional
        -- { 'no styling supplied', 'no styling supplied', {['err'] = true} }
            {
                {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}},
                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20'
            },
            {
                {{'1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20'}},
                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20'
            },
            {
                {{[1]='1',[2]='2',[3]='3',[4]='4',[5]='5',[6]='6',[7]='7',[8]='8',[9]='9',[10]='10',[11]='11',[12]='12',[13]='13',[14]='14',[15]='15',[16]='16',[17]='17',[18]='18',[19]='19',[20]='20'}},
                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20'
            },
            {
                {{[1]='1',[2]='2',[3]='3',[4]='4',[5]='5',[6]='6',[7]='7',[8]='8',[9]='9',[10]='10',[11]='11',[12]='12',[13]='13',[14]='14',[15]='15',[16]='16',[17]='17',[18]='18',[19]='19',[20]='20'}},
                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20'
            },
            {
                {{['a']='a',['b']='b',['c']='c',['d']='d',['e']='e',['f']='f',['g']='g',['h']='h',['i']='i',['j']='j',['k']='k',['l']='l',['m']='m',['n']='n',['o']='o',['p']='p',['q']='q',['r']='r',['s']='s',['t']='t'}},
                'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t'
            }
        }
    },
}
-- </pre>
--[[Category:Lua testcases]]
Advertisement