Jump to content

Template:Sclass/core/testcases

From Wikipedia, the free encyclopedia
Sclass/core/sandbox (edit · t · history · diff · links · /test · Source · e · t · hist · links · /subpages · /doc · /doc edit)
hyphened
{{Sclass}} (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test)
{{Sclass2}} (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test)


Categories

[edit]

Sclass

[edit]

Basic (1, 2)

[edit]
  • Error: {{sclass}} missing required parameter: class name (help)
{{Sclass|One|Two|3|Four|Five}}
One-class Two
One-class Two -- hardcoded
One-class Two (Five) Two (Four) -- targets
  • Error: {{sclass/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)

Errors

[edit]

Benjamin Franklin-class submarine

1, 2 missing Error: {{sclass}} missing required parameter: ship type (help) Error: {{sclass/sandbox}} missing required parameter: ship type (help)
Error: {{sclass}} missing required parameter: class name (help) Error: {{sclass/sandbox}} missing required parameter: class name (help)
3 is unk, 6 Error: {{sclass}} invalid format code: 6. Should be 0–5, or blank (help) Error: {{sclass/sandbox}} invalid format code: 6. Should be 0–5, or blank (help)
Error: {{sclass}} invalid format code: 99. Should be 0–5, or blank (help) Error: {{sclass/sandbox}} invalid format code: 99. Should be 0–5, or blank (help)
Error: {{sclass}} invalid format code: xyz. Should be 0–5, or blank (help) Error: {{sclass/sandbox}} invalid format code: xyz. Should be 0–5, or blank (help)
{{Sclass}}: nonhyphen is R
target: Benjamin Franklin class submarine
Benjamin Franklin-class submarine Benjamin Franklin-class submarine
show DABs, target: King George V-class battleship (1939) Error: {{sclass}} invalid format code: 9. Should be 0–5, or blank (help) Error: {{sclass/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)

Format (3)

[edit]

An optional third parameter allows you to control the format and use the template if Ship type is not an article:

The values and results for format are:

0: suppresses ship type display entirely. Adjectival form
1: displays ship type as part of the single link to the class article
2: displays ship type, but unlinked
3: displays ship type as a separate link. Ship type must be the name of an article
4: suppresses ship type display entirely. Noun form.
5: class name only, suitable for tables
6: Deprecated Use Option 1

To avoid the dreaded red link, one of the first three options must be used if Ship type is not already an article. Note that option 3 is the default, so may be omitted. Other values of format will let you know the error of your ways.

  • {{Sclass| Haskell | attack transport |x}}
Target article: Haskell-class attack transport

DAB (4, 5)

[edit]
DAB-4=1967
  • target: Redoutable-class submarine (dab-4 unused)
  • opt9: Error: {{sclass/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)
  • {{Sclass|Redoutable|submarine|x|1967}}
Target article: Redoutable-class submarine (1967)
DAB article: Redoutable-class submarine


Bangor-class minesweeper
Error: {{sclass/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)

5

[edit]
DAB-5=1939
Target article: King George V-class battleship (1939)
DAB article: King George V-class battleship

Sclass2

[edit]

Basic2 (1, 2)

[edit]
  • Error: {{sclass2}} missing required parameter: class name (help)
Flower-class corvette

Errors2

[edit]

Tribal-class destroyer Flower corvette Flower-class corvette

1, 2 missing Error: {{sclass2}} missing required parameter: ship type (help) Error: {{sclass2/sandbox}} missing required parameter: ship type (help)
Error: {{sclass2}} missing required parameter: class name (help) Error: {{sclass2/sandbox}} missing required parameter: class name (help)
3 is unk2, 6 Error: {{sclass2}} invalid format code: 6. Should be 0–5, or blank (help) Error: {{sclass2/sandbox}} invalid format code: 6. Should be 0–5, or blank (help)
Error: {{sclass2}} invalid format code: 99. Should be 0–5, or blank (help) Error: {{sclass2/sandbox}} invalid format code: 99. Should be 0–5, or blank (help)
Error: {{sclass2}} invalid format code: xyz. Should be 0–5, or blank (help) Error: {{sclass2/sandbox}} invalid format code: xyz. Should be 0–5, or blank (help)
{{Sclass2}}: nonhyphen is R
target: Flower class corvette
Flower-class corvette Flower-class corvette
show DABs, target: King George V-class battleship (1939) Error: {{sclass2}} invalid format code: 9. Should be 0–5, or blank (help) Error: {{sclass2/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)

Format2 (3)

[edit]

An optional third parameter allows you to control the format and use the template if Ship type is not an article:

The values and results for format are:

0: suppresses ship type display entirely. Adjectival form
1: displays ship type as part of the single link to the class article
2: displays ship type, but unlinked
3: displays ship type as a separate link. Ship type must be the name of an article
4: suppresses ship type display entirely. Noun form.
5: class name only, suitable for tables
6: Deprecated Use Option 1

To avoid the dreaded red link, one of the first three options must be used if Ship type is not already an article. Note that option 3 is the default, so may be omitted. Other values of format will let you know the error of your ways.

Target article: Flower-class corvette
  • {{Sclass2|Flower|corvette|x}}

DAB2 (4, 5)

[edit]
Tribal-class destroyer
  • Error: {{sclass2}} invalid format code: 9. Should be 0–5, or blank (help)
Error: {{sclass2/sandbox}} invalid format code: 9. Should be 0–5, or blank (help)