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
No edit summary
No edit summary
Line 12: Line 12:
 
{
 
{
 
'[[User:DutyS12345|T]]',
 
'[[User:DutyS12345|T]]',
'[[User:DutyS12345|T]]'
+
'T'
 
},
 
},
 
{
 
{
 
'[[User:DutyS12345|DutyS12345]]',
 
'[[User:DutyS12345|DutyS12345]]',
'[[User:DutyS12345|DutyS12345]]'
+
'DutyS12345'
 
},
 
},
 
{
 
{
 
'[[ User:DutyS12345]]',
 
'[[ User:DutyS12345]]',
'[[ User:DutyS12345]]'
+
' User:DutyS12345'
 
},
 
},
 
{
 
{
 
'[[ :User:DutyS12345]]',
 
'[[ :User:DutyS12345]]',
'[[ :User:DutyS12345]]'
+
' :User:DutyS12345'
 
},
 
},
 
{
 
{
 
'[[:User:DutyS12345]]',
 
'[[:User:DutyS12345]]',
'[[:User:DutyS12345]]'
+
'User:DutyS12345'
 
}
 
}
 
--[==[
 
--[==[

Revision as of 18:57, 16 February 2020

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'
            }
--[==[
Case 6a:
[[  : User:DutyS12345]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[  : User:DutyS12345]]|s}}<br>
Case 6b:
[[: User:DutyS12345]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[: User:DutyS12345]]|s}}<br>
Case 7:
[[:]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[:]]|s}}<br>
Case 8a:
[[ :]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[ :]]|s}}<br>
Case 8b:
[[:  l]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[:  l]]|s}}<br>
Case 9:
[[ : ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[ : ]]|s}}<br>
Case 10:
[[ : l]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[ :  l]]|s}}<br>
Case 11:
[[ : l ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[ : l ]]|s}}<br>
Case 12:
[[  :  l  ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[ :  l  ]]|s}}<br>
Case 13:
[[:]  l  ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[:]  l  ]]|s}}<br>
Case 14:
[[:| ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[:| ]]|s}}<br>
Case 15:
[[: | l ]]<br>{{#invoke:Sandbox/DutyS12345|striplinks|[[:| l ]]|s}}<br>
--]==]
        }
    },
    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'
            }
        }
    },
    testtbl_concat2 = {
        options = {
            mode = 'method',
            nowiki = true
        },
        tests = {
            {
                {{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]]