Module:Region topic/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
Moved data from Module:Sandbox/SiBr4/sub |
||
Line 17: | Line 17: | ||
function p.data1(frame) |
function p.data1(frame) |
||
return navbox(frame,{ |
return navbox(frame,{ |
||
region = " |
region = "World", |
||
region_the = true, |
|||
group1 = { |
group1 = { |
||
name = "[[Sovereign state]]s", |
|||
data = { |
data = { |
||
{" |
{"AF","Afghanistan",switch="Asia"}, |
||
{" |
{"BS","Bahamas",the=true}, |
||
{" |
{"KH","Cambodia",switch="Asia"}, |
||
{"DK","Denmark"}, |
|||
{"EG","Egypt",hidden=true,switch="Africa"}, |
|||
{"FJ","Fiji"}, |
|||
{"GE","Georgia",link="Georgia (country)",switch="Asia"}, |
|||
{"MK","Macedonia",link="Republic of Macedonia",the=true}, |
|||
{"GB","United Kingdom",the=true,subgroup={ |
|||
{"ENG","England"}, |
|||
{"NIR","Northern Ireland"}, |
|||
{"SCT","Scotland"}, |
|||
{"WLS","Wales"}, |
|||
hidden=true,switch="UKCC"}} |
|||
} |
} |
||
}, |
}, |
||
group2 = { |
group2 = { |
||
name = "[[List of states with limited recognition|States with limited recognition]]", |
|||
data = { |
data = { |
||
{" |
{"XKS","Kosovo"}, |
||
{" |
{"XNC","Northern Cyprus"}, |
||
{" |
{"XSD","Somaliland",hidden=true,switch="Africa"}, |
||
{"XSO","South Ossetia",switch="Asia"} |
|||
} |
} |
||
}, |
|||
group3 = { |
|||
name = "[[Dependent territory|Dependent territories]]", |
|||
data = { |
|||
{"AI","Anguilla"}, |
|||
{"VG","British Virgin Islands",the=true}, |
|||
{"GL","Greenland"}, |
|||
{"MO","Macau",switch="Asia"} |
|||
}, |
|||
switch = "deps" |
|||
}, |
|||
group4 = { |
|||
name = "Switchable hidden group", |
|||
data = { |
|||
{"AA","AA"}, |
|||
{"AB","AB"}, |
|||
{"AC","AC"} |
|||
}, |
|||
switch = "foo", |
|||
hidden = true |
|||
}, |
|||
group5 = { |
|||
name = "Switchable hidden group 2", |
|||
data = { |
|||
{"XW","XW",switch="show_XW"}, |
|||
{"XX","XX",switch="show_XX",hidden=true}, |
|||
{"XY","XY",switch="hide_XY",negate_switch=true}, |
|||
{"XZ","XZ",switch="hide_XZ",hidden=true,negate_switch=true} |
|||
}, |
|||
switch = "foo_hidden", |
|||
negate_switch = true, |
|||
hidden = true |
|||
} |
} |
||
}) |
}) |
Revision as of 13:22, 30 December 2015
![]() | This is the test cases page for the module Module:Region topic. Results of the test cases. |
--This module returns a set of testcases for [[Module:Region topic]].
--See its output on its talk page.
local p = {}
local function navbox(frame,data)
local args = frame.args
if args.list then
return require("Module:Region topic").luaList(data)
else
args.name = "Module:Region topic/tests"
args.data = data
return require("Module:Region topic").luaMain(args)
end
end
function p.data1(frame)
return navbox(frame,{
region = "World",
region_the = true,
group1 = {
name = "[[Sovereign state]]s",
data = {
{"AF","Afghanistan",switch="Asia"},
{"BS","Bahamas",the=true},
{"KH","Cambodia",switch="Asia"},
{"DK","Denmark"},
{"EG","Egypt",hidden=true,switch="Africa"},
{"FJ","Fiji"},
{"GE","Georgia",link="Georgia (country)",switch="Asia"},
{"MK","Macedonia",link="Republic of Macedonia",the=true},
{"GB","United Kingdom",the=true,subgroup={
{"ENG","England"},
{"NIR","Northern Ireland"},
{"SCT","Scotland"},
{"WLS","Wales"},
hidden=true,switch="UKCC"}}
}
},
group2 = {
name = "[[List of states with limited recognition|States with limited recognition]]",
data = {
{"XKS","Kosovo"},
{"XNC","Northern Cyprus"},
{"XSD","Somaliland",hidden=true,switch="Africa"},
{"XSO","South Ossetia",switch="Asia"}
}
},
group3 = {
name = "[[Dependent territory|Dependent territories]]",
data = {
{"AI","Anguilla"},
{"VG","British Virgin Islands",the=true},
{"GL","Greenland"},
{"MO","Macau",switch="Asia"}
},
switch = "deps"
},
group4 = {
name = "Switchable hidden group",
data = {
{"AA","AA"},
{"AB","AB"},
{"AC","AC"}
},
switch = "foo",
hidden = true
},
group5 = {
name = "Switchable hidden group 2",
data = {
{"XW","XW",switch="show_XW"},
{"XX","XX",switch="show_XX",hidden=true},
{"XY","XY",switch="hide_XY",negate_switch=true},
{"XZ","XZ",switch="hide_XZ",hidden=true,negate_switch=true}
},
switch = "foo_hidden",
negate_switch = true,
hidden = true
}
})
end
return p