Jump to content

Template:PLANTS/testcases

From Wikipedia, the free encyclopedia

Template behavior

[edit]

See https://plants.sc.egov.usda.gov/home/help for Citing the PLANTS Database. This change will cite the author, work, publisher, and location as requested on the PLANTS DB help page.

  • PLANTS currently sets the following:
| url       = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol}}}}}}}}
| title     = ''{{{name|{{{taxon}}}}}}''
| publisher = [[Natural Resources Conservation Service]] PLANTS Database. [[United States Department of Agriculture|USDA]]
  • PLANTS/sandbox sets the following:
| last1      = ((USDA, NRCS))
| author-link1 = Natural Resources Conservation Service
| date      = {{{date|n.d.}}}
| url       = https://plants.sc.egov.usda.gov/home/plantProfile?symbol={{Trim|{{{id|{{{symbol|}}}}}}}}
| title     = ''{{{name|{{{taxon|{{{id|{{{symbol|Search}}}}}}}}}}}}''
| website   = The PLANTS Database (plants.usda.gov)
| publisher = National Plant Data Team
| location  = Greensboro, North Carolina
| language  = en

If date is not specified, it will default to n.d.

Test cases

[edit]

Basic

[edit]
Set nothing
{{PLANTS}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Search​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Search". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Basic access date cases
{{PLANTS|access-date=11 November 2014 |symbol=VAMA |taxon=Vaccinium macrocarpon}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Vaccinium macrocarpon​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.

{{PLANTS|access-date=December 11, 2015 |id=TOCA |taxon=Torreya californica}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Torreya californica​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved December 11, 2015.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Torreya californica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved December 11, 2015.

{{PLANTS|accessdate=24 November 2015 |id=SPTR |taxon=Sparaxis tricolor}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Sparaxis tricolor​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 24 November 2015.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Sparaxis tricolor". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 24 November 2015.

{{PLANTS|access-date=6 July 2015 |id=MEOF2 |taxon=Melissa officinalis}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Melissa officinalis​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Melissa officinalis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

Date and access date

[edit]
Date and access date
{{PLANTS|access-date=6 July 2015 |date=2014 |id=SYON2 |taxon=Symphyotrichum ontarionis}}

{{PLANTS}}

USDA, NRCS (2014). "​Symphyotrichum ontarionis​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS/sandbox}}

USDA, NRCS (2014). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

Date but no access date
{{PLANTS|date=2016 |id=SYAN3 |taxon=Symphyotrichum anticostense}}

{{PLANTS}}

USDA, NRCS (2016). "​Symphyotrichum anticostense​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (2016). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

No dates
{{PLANTS|id=SYCA3 |taxon=Symphyotrichum campestre}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum campestre​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

String of the same date with multiple calls in same article
{{PLANTS|access-date=6 July 2015 |date=2015a |id=SYON2 |taxon=Symphyotrichum ontarionis}}

{{PLANTS}}

USDA, NRCS (2015a). "​Symphyotrichum ontarionis​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS/sandbox}}

USDA, NRCS (2015a). "Symphyotrichum ontarionis". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS|access-date=6 July 2015 |date=2015b |id=SYAN3 |taxon=Symphyotrichum anticostense}}

{{PLANTS}}

USDA, NRCS (2015b). "​Symphyotrichum anticostense​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS/sandbox}}

USDA, NRCS (2015b). "Symphyotrichum anticostense". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS|access-date=6 July 2015 |date=2015c |id=SYCA3 |taxon=Symphyotrichum campestre}}

{{PLANTS}}

USDA, NRCS (2015c). "​Symphyotrichum campestre​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

{{PLANTS/sandbox}}

USDA, NRCS (2015c). "Symphyotrichum campestre". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 6 July 2015.

Some examples in place in articles

[edit]
{{PLANTS|access-date=11 November 2014 |symbol=VAMA |taxon=Vaccinium macrocarpon}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Vaccinium macrocarpon​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Vaccinium macrocarpon". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 11 November 2014.

{{PLANTS|access-date=2018-11-07 |id=PSME |taxon=Pseudotsuga menziesii}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Pseudotsuga menziesii​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Pseudotsuga menziesii". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.

{{PLANTS|access-date=2018-11-07 |id=PIRE |taxon=Pinus resinosa}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Pinus resinosa​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Pinus resinosa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 2018-11-07.

{{PLANTS|symbol=PHME13 |taxon=Photinia melanocarpa}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Photinia melanocarpa​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Photinia melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS|symbol=PHFL9 |taxon=Photinia floribunda}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Photinia floribunda​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Photinia floribunda". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS|symbol=PRVIM |taxon=Prunus virginiana var. melanocarpa}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Prunus virginiana var. melanocarpa​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Prunus virginiana var. melanocarpa". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS|accessdate=4 December 2015 |id=STNU4 |taxon=Strychnos nux-vomica}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Strychnos nux-vomica​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 4 December 2015.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Strychnos nux-vomica". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 4 December 2015.

{{PLANTS|accessdate=14 October 2015 |id=PRSC |taxon=Pritchardia schattaueri}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Pritchardia schattaueri​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 14 October 2015.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Pritchardia schattaueri". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 14 October 2015.

{{PLANTS|accessdate=31 Jul 2016 |symbol=CLTE3 |taxon=Clitoria ternatea}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Clitoria ternatea​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 31 Jul 2016.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Clitoria ternatea". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. Retrieved 31 Jul 2016.

Let's check for expected (or not) errors in the sandbox

[edit]
Invalid id, no taxon/name/title - error = no ; behavior - title = id and url is built properly
{{PLANTS|id=ZZZZ}}

{{PLANTS}}

USDA, NRCS (n.d.). "​ZZZZ​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Invalid symbol, no taxon/name/title - error = no ; behavior - title = symbol and url is built properly
{{PLANTS|symbol=ZZZZ}}

{{PLANTS}}

USDA, NRCS (n.d.). "​ZZZZ​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "ZZZZ". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set id only - error = no; behavior - title is id
{{PLANTS|id=SYCOR}}

{{PLANTS}}

USDA, NRCS (n.d.). "​SYCOR​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "SYCOR". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set taxon and title - error = no; behavior - title overrides taxon
{{PLANTS|id=SYCOR |taxon=Symphyotrichum cordifolium |title=TITLE}}

{{PLANTS}}

USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set taxon and name - error = no; behavior - name overrides taxon
{{PLANTS|id=SYCOR |name=NAME |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS (n.d.). "​NAME​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "NAME". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set name and taxon and title - error = no; behavior - title overrides name and taxon
{{PLANTS|id=SYCOR |name=NAME |taxon=Symphyotrichum cordifolium |title=TITLE}}

{{PLANTS}}

USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "TITLE". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set website - error = no
{{PLANTS|id=SYCOR |taxon=Symphyotrichum cordifolium |website=plants.gov}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". plants.gov. Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". plants.gov. Greensboro, North Carolina: National Plant Data Team.

Set work - error = yes
{{PLANTS|id=SYCOR |taxon=Symphyotrichum cordifolium |work=plants.gov}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |work= and |website= specified (help)

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |work= and |website= specified (help)

Set author - error = yes
{{PLANTS|author=AUTHORTEST |id=SYCOR |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author= and |last1= specified (help)

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author= and |last1= specified (help)

Set author1 - error = yes
{{PLANTS|author1=AUTHOR1TEST |id=SYCOR |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author1= and |last1= specified (help)

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author1= and |last1= specified (help)

Set author2 - error = no
{{PLANTS|author2=AUTHOR2TEST |id=SYCOR |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS; AUTHOR2TEST (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

{{PLANTS/sandbox}}

USDA, NRCS; AUTHOR2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

Set last - error = yes
{{PLANTS|id=SYCOR |last=LASTTEST |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

LASTTEST (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |last1= and |last= specified (help)

{{PLANTS/sandbox}}

LASTTEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |last1= and |last= specified (help)

Set last1 - error = no
{{PLANTS|id=SYCOR |last1=LAST1TEST |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

LAST1TEST (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

{{PLANTS/sandbox}}

LAST1TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

Set last2 - error = no
{{PLANTS|id=SYCOR |last2=LAST2TEST |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS; LAST2TEST (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

{{PLANTS/sandbox}}

USDA, NRCS; LAST2TEST (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.{{cite web}}: CS1 maint: numeric names: authors list (link)

Set author-link1 - error = no
{{PLANTS|author-link1=AUTHORLINK1 |id=SYCOR |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team.

Set author-link - error = yes
{{PLANTS|author-link=AUTHORLINK |id=SYCOR |taxon=Symphyotrichum cordifolium}}

{{PLANTS}}

USDA, NRCS (n.d.). "​Symphyotrichum cordifolium​". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author-link1= and |author-link= specified (help)

{{PLANTS/sandbox}}

USDA, NRCS (n.d.). "Symphyotrichum cordifolium". The PLANTS Database (plants.usda.gov). Greensboro, North Carolina: National Plant Data Team. {{cite web}}: More than one of |author-link1= and |author-link= specified (help)