Difference between revisions of "Template:Baseballstats/testcases"
Jump to navigation
Jump to search
imported>Dmoore5556 (updating test cases to make testing of Live and Sandbox equivalent; add some bogus fields to make sure gracefully handled; add a couple test cases for undocumented |id= field) |
imported>Zyxw (Show results from main template and sandbox together. Use collapsible option to quickly show when no difference between main template and sandbox. Add tests for non-numeric value in cube parameter.) |
||
Line 1: | Line 1: | ||
{{testcases notice}} | {{testcases notice}} | ||
− | == | + | == Player tests == |
− | + | ||
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 1 |
− | {{ | + | |code=<nowiki>{{__TEMPLATENAME__ |br=c/clemero01 |retro=C/Pclemr101 |fangraphs=1002340 |cube=9963 }}</nowiki> |
− | {{ | + | }} |
+ | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 2 | ||
+ | |code=<nowiki>{{__TEMPLATENAME__ |br=c/clemero01 |fangraphs=1002340 |cube=9963 |retro=}}</nowiki> | ||
+ | }} | ||
+ | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 3 | ||
+ | |code=<nowiki>{{__TEMPLATENAME__ |cube=9963 |retro= |br= |fangraphs=1002340}}</nowiki> | ||
+ | }} | ||
<!--These next 3 lines test undocumented |id= field, where |id and |br are concatenated --> | <!--These next 3 lines test undocumented |id= field, where |id and |br are concatenated --> | ||
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 4 |
− | {{ | + | |code=<nowiki>{{__TEMPLATENAME__ |id=c/ |br=clemero01 |fangraphs=1002340 |cube=9963 |retro=}}</nowiki> |
− | {{ | + | }} |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 5 | |
− | {{ | + | |code=<nowiki>{{__TEMPLATENAME__ |br=clemero01 |fangraphs=1002340 |cube=9963 |retro= |id=c/ }}</nowiki> |
− | {{ | + | }} |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Roberto Clemente 6 | |
− | {{ | + | |code=<nowiki>{{__TEMPLATENAME__ |id=c/clemero01 |fangraphs=1002340 |cube=9963 |retro=}}</nowiki> |
− | {{ | + | }} |
− | + | ||
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Ty Cobb 1 |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |mlb= |espn= |br=c/cobbty01 |fangraphs=1002378 |cube=9996|brm=cobb--001tyr |retro=C/Pcobbt101}}</nowiki> | |
− | + | }} | |
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Ty Cobb 2 |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |retro=C/Pcobbt101 |mlb= |espn= |br=c/cobbty01 |fangraphs=1002378 |cube=9996|brm=cobb--001tyr }}</nowiki> | |
− | + | }} | |
− | + | ||
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Joe DiMaggio 1 |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |br=d/dimagjo01 |fangraphs=1003311 |cube=10765 |brm=dimagg001jos | |
− | + | |retro=D/Pdimaj101}}</nowiki> | |
− | + | }} | |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Joe DiMaggio 2 | |
+ | |code=<nowiki>{{__TEMPLATENAME__ |br=d/dimagjo01 |retro=D/Pdimaj101 |fangraphs=1003311 |cube=10765 |brm=dimagg001jos |mlb= |espn=}}</nowiki> | ||
+ | }} | ||
+ | |||
+ | {{Test case nowiki|format=tablerows|collapsible=yes|title=Ted Williams 1 | ||
+ | |code=<nowiki>{{__TEMPLATENAME__ |mlb=124341 |espn=28096 |br=w/willite01 |fangraphs=1014040 |cube=19737 |brm=willia002the |retro=W/Pwillt103}}</nowiki> | ||
+ | }} | ||
+ | {{Test case nowiki|format=tablerows|collapsible=yes|title=Ted Williams 2 | ||
+ | |code=<nowiki>{{__TEMPLATENAME__ |espn=28096 |mlb=124341 }}</nowiki> | ||
+ | }} | ||
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Enos Slaughter | |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |retro=S/Pslaue101 |INVALID=1234 |br=s/slaugen01}}</nowiki> | |
− | {{ | + | }} |
− | {{ | + | |
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Jim Rice |
− | < | + | |code=<nowiki>{{__TEMPLATENAME__ |br=r/riceji01 |retro=R/Pricej001}}</nowiki> |
− | {{ | + | }} |
− | {{ | + | |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|title=Carlton Fisk | |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |retro=F/Pfiskc001}}</nowiki> | |
− | {{ | + | }} |
− | {{ | + | |
− | + | == error checking and cube parameter == | |
− | {{ | + | |
− | {{ | + | {{Test case nowiki|format=tablerows|collapsible=yes|output=nowiki+|title=One invalid parameter name |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |BOGUS=bogus}}</nowiki> | |
− | {{ | + | }} |
− | {{ | + | |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|output=nowiki+|title=No parameters | |
− | {{ | + | |code=<nowiki>{{__TEMPLATENAME__}}</nowiki> |
− | + | }} | |
− | {{ | + | |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|output=nowiki+|title=cube{{=}}R/Cal-Ripken | |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |cube=R/Cal-Ripken}}</nowiki> | |
− | {{ | + | }} |
− | + | {{Test case nowiki|format=tablerows|collapsible=yes|output=nowiki+|title=cube{{=}}Cal-Ripken | |
− | + | |code=<nowiki>{{__TEMPLATENAME__ |cube=Cal-Ripken}}</nowiki> | |
− | + | }} | |
+ | {{Test case nowiki|format=tablerows|collapsible=yes|output=nowiki+|title=cube{{=}}550 | ||
+ | |code=<nowiki>{{__TEMPLATENAME__ |cube=550}}</nowiki> | ||
+ | }} |
Revision as of 01:54, 29 December 2018
![]() | This is the template test cases page for the sandbox of Template:Baseballstats. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Player tests
Roberto Clemente 1 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=c/clemero01 |retro=C/Pclemr101 |fangraphs=1002340 |cube=9963 }}
|
Roberto Clemente 2 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=c/clemero01 |fangraphs=1002340 |cube=9963 |retro=}}
|
Roberto Clemente 3 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |cube=9963 |retro= |br= |fangraphs=1002340}}
|
Roberto Clemente 4 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |id=c/ |br=clemero01 |fangraphs=1002340 |cube=9963 |retro=}}
|
Roberto Clemente 5 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=clemero01 |fangraphs=1002340 |cube=9963 |retro= |id=c/ }}
|
Roberto Clemente 6 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |id=c/clemero01 |fangraphs=1002340 |cube=9963 |retro=}}
|
Ty Cobb 1 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |mlb= |espn= |br=c/cobbty01 |fangraphs=1002378 |cube=9996|brm=cobb--001tyr |retro=C/Pcobbt101}}
|
Ty Cobb 2 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |retro=C/Pcobbt101 |mlb= |espn= |br=c/cobbty01 |fangraphs=1002378 |cube=9996|brm=cobb--001tyr }}
|
Joe DiMaggio 1 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=d/dimagjo01 |fangraphs=1003311 |cube=10765 |brm=dimagg001jos |retro=D/Pdimaj101}}
|
Joe DiMaggio 2 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=d/dimagjo01 |retro=D/Pdimaj101 |fangraphs=1003311 |cube=10765 |brm=dimagg001jos |mlb= |espn=}}
|
Ted Williams 1 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |mlb=124341 |espn=28096 |br=w/willite01 |fangraphs=1014040 |cube=19737 |brm=willia002the |retro=W/Pwillt103}}
|
Ted Williams 2 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |espn=28096 |mlb=124341 }}
|
Enos Slaughter | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |retro=S/Pslaue101 |INVALID=1234 |br=s/slaugen01}}
|
Jim Rice | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |br=r/riceji01 |retro=R/Pricej001}}
|
Carlton Fisk | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |retro=F/Pfiskc001}}
|
error checking and cube parameter
One invalid parameter name | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |BOGUS=bogus}}
|
No parameters | ||||||
---|---|---|---|---|---|---|
{{Baseballstats}}
|
cube=R/Cal-Ripken | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |cube=R/Cal-Ripken}}
|
cube=Cal-Ripken | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |cube=Cal-Ripken}}
|
cube=550 | ||||||
---|---|---|---|---|---|---|
{{Baseballstats |cube=550}}
|