Jump to content

Template:Ship name format/testcases

From Wikipedia, the free encyclopedia
Test1 – typical case, name parameter provided, no unnamed parameter
{{Ship name format|name=USS Will Rogers (SSBN-659)}}

{{Ship name format}}

USS Will Rogers (SSBN-659)

{{Ship name format/sandbox}}

USS Will Rogers (SSBN-659)

Test2 – name overrides first unnamed parameter
{{Ship name format|HMS Victory|name=USS Constitution}}

{{Ship name format}}

USS Constitution

{{Ship name format/sandbox}}

USS Constitution

Test3 – name missing, first unnamed parameter used
{{Ship name format|HMS Hood}}

{{Ship name format}}

{{{name}}}

{{Ship name format/sandbox}}

HMS Hood

Test4 – hide dab
{{Ship name format|dab=none |name=USS Will Rogers (SSBN-659)}}

{{Ship name format}}

USS Will Rogers

{{Ship name format/sandbox}}

USS Will Rogers

Test5 – ship class
{{Ship name format|name=Benjamin Franklin-class submarine}}

{{Ship name format}}

Benjamin Franklin-class submarine

{{Ship name format/sandbox}}

Benjamin Franklin-class submarine

Test6 – ship class; class not named for a member of the class
{{Ship name format|name=Flower-class corvette |sclass=2}}

{{Ship name format}}

Flower-class corvette

{{Ship name format/sandbox}}

Flower-class corvette

Test7 – ship class; noun-form
{{Ship name format|adj=off |name=Benjamin Franklin-class submarine}}

{{Ship name format}}

Benjamin Franklin class

{{Ship name format/sandbox}}

Benjamin Franklin class