Jump to content
Wikipedia The Free Encyclopedia

Module:AutosortTable/testcases

From Wikipedia, the free encyclopedia
This is the test cases page for the module Module:AutosortTable. Results of the test cases.
 localp={}

 functionp:example()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitable
 |style=width:50%;
 |separator=--
 |order=2,1
 |numeric=2
 |header=--Name--Age

 |--Bob--20
 |--Peter--35
 |--John--35
 |--James--50
 |--Henry--45

 }}
 ]])
 end

 functionp:example_desc()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitable
 |style=width:50%;
 |separator=--
 |order=2,1
 |descending=1,2
 |numeric=2
 |header=--Name--Age

 |--Bob--20
 |--Peter--35
 |--John--35
 |--James--50
 |--Henry--45

 }}
 ]])
 end

 functionp:example_4cols()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitablesortable
 |style=width:50%;
 |separator=::
 |order=2,3,4,5,1
 |numeric=2,3,4,5
 |header=::Name::A::B::C::D

 |::Bob::20::3::394::0.38
 |::Peter::35::4::472::1.48
 |::John::35::4::472::-1.38
 |::James::35::6::465::10.384
 |::Henry::35::4::472::2.49
 |::Smith::35::-2::411::9.27
 |::Doe::35::4::876::-3.52
 |::Joseph::35::6::183::3.29482
 |::Frank::20::-3::454::4.102
 |::Martin::35::4::472::0.00013

 }}
 ]])
 end

 functionp:example_4colsdesc()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitablesortable
 |style=width:50%;
 |separator=::
 |order=2,3,4,5,1
 |numeric=2,3,4,5
 |descending=4,5
 |header=::Name::A::B::C::D

 |::Bob::20::3::394::0.38
 |::Peter::35::4::472::1.48
 |::John::35::4::472::-1.38
 |::James::35::6::465::10.384
 |::Henry::35::4::472::2.49
 |::Smith::35::-2::411::9.27
 |::Doe::35::4::876::-3.52
 |::Joseph::35::6::183::3.29482
 |::Frank::20::-3::454::4.102
 |::Martin::35::4::472::0.00013

 }}
 ]])
 end

 functionp:example_css()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitablesortable
 |style=width:50%;
 |separator=::
 |order=2,3,4,5,1
 |numeric=2,3,4,5
 |header=::Name::A::B::C::D
 |colstyle=::::::::font-family:monospace::color:#DD9900

 |background-color:#FFDDDD::Bob::20::3::394::0.38
 |background-color:#DDDDFF::Peter::35::4::472::1.48
 |background-color:#FFDDDD::John::35::4::472::-1.38
 |background-color:#DDDDFF::James::35::6::465::10.384
 |::''Henry''::35::4::472::2.49
 |border:2pxsolid#FF0000::Smith::35::-2::411::9.27
 |background-color:#FFDDDD::Doe::35::4::876::-3.52
 |text-align:center;color:#008800::Joseph::35::6::183::3.29482
 |text-decoration:underline::Frank::20::-3::454::4.102
 |::Martin::35::4::472::0.00013

 }}
 ]])
 end

 functionp:example_hiddencols()
 returnself:preprocess([[
 {{#invoke:AutosortTable|create

 |class=wikitablesortable
 |style=width:50%;
 |separator=::
 |order=2,3,4,5,1
 |numeric=2,3,4,5
 |hidden=2,3
 |header=::Name::C::D

 |::Bob::20::3::394::0.38
 |::Peter::35::4::472::1.48
 |::John::35::4::472::-1.38
 |::James::35::6::465::10.384
 |::Henry::35::4::472::2.49
 |::Smith::35::-2::411::9.27
 |::Doe::35::4::876::-3.52
 |::Joseph::35::6::183::3.29482
 |::Frank::20::-3::454::4.102
 |::Martin::35::4::472::0.00013

 }}
 ]])
 end

 returnp

AltStyle によって変換されたページ (->オリジナル) /