Template:Sclass/core/testcases
{{testcases notice}}
:{{t links|Sclass/core/sandbox}}
;hyphened
:{{t links|Sclass}}
:{{t links|Sclass2}}
__TOC__
Categories
- {{clc|WPSHIPS: sclass invalid option}}
Sclass
= Basic (1, 2) =
- {{Sclass|}}
:
:{{Sclass|One|Two|3|Four|Five}}
:One-class Two (Five) Two (Four) -- targets
- {{Sclass/sandbox|One|Two|9|Four|Five}}
= Errors =
Benjamin Franklin-class submarine
class="wikitable" style="font-size:90%" | ||||
1, 2 missing | {{Sclass|One | 3=3}} | {{Sclass/sandbox|One | 3=3}} |
{{Sclass | Two|3=3}} | {{Sclass/sandbox | Two|3=3}} | |
3 is unk, 6 | {{Sclass|Benjamin Franklin|submarine|6}} | {{Sclass/sandbox|Benjamin Franklin|submarine|6}} | ||
{{Sclass|Benjamin Franklin|submarine|99}} | {{Sclass/sandbox|Benjamin Franklin|submarine|99}} | |||
{{Sclass|Benjamin Franklin|submarine|xyz}} | {{Sclass/sandbox|Benjamin Franklin|submarine|xyz}} | |||
{{tl|Sclass}}: nonhyphen is R target: Benjamin Franklin class submarine | {{Sclass|Benjamin Franklin|submarine}} | {{Sclass/sandbox|Benjamin Franklin|submarine}} | |||
show DABs, target: King George V-class battleship (1939)
| {{Sclass|King George V|battleship|9|dab4|1939}} | {{Sclass/sandbox|King George V|battleship|9|dab4|1939}} |
= Format (3) =
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: {{!xt |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
class="wikitable nowraplinks" |
Param
! Wikicode ! Result ! /sandbox ! note |
---|
None
| | {{Sclass|Haskell|attack transport}} | {{sclass/sandbox|Haskell|attack transport}} | Default |
0
| {{Sclass| Haskell | attack transport |0}} | {{sclass/sandbox| Haskell | attack transport |0}} | Adjectival form |
1
| | {{Sclass| Haskell | attack transport |1}} | {{sclass/sandbox| Haskell | attack transport |1}} | Article title |
2
| | {{Sclass| Haskell | attack transport |2}} | {{sclass/sandbox| Haskell | attack transport |2}} | When the ship type article does not exist |
3
| | {{Sclass| Haskell | attack transport |3}} | {{sclass/sandbox| Haskell | attack transport |3}} | Same as default |
4
| {{Sclass| Haskell | attack transport |4}} | {{sclass/sandbox| Haskell | attack transport |4}} | Noun form |
5
| | {{Sclass| Haskell | attack transport |5}} | {{sclass/sandbox| Haskell | attack transport |5}} | Table or chart form |
6
| | {{Sclass| Haskell | attack transport |6}} | {{sclass/sandbox| Haskell | attack transport |6}} | {{!xt |Deprecated}} Use option 1 |
9
| | {{Sclass| Haskell | attack transport |9}} | {{sclass/sandbox| Haskell | attack transport |9}} | (show target) |
= DAB (4, 5) =
;DAB-4=1967
- target: Redoutable-class submarine (dab-4 unused)
- opt9: {{Sclass/sandbox|Redoutable|submarine|9|1967}}
{{Sclass|Redoutable|submarine|x|1967}}
: Target article: Redoutable-class submarine (1967)
: DAB article: Redoutable-class submarine
:{{sclass/sandbox|Bangor|minesweeper|3|ship}}
:{{sclass/sandbox|Bangor|minesweeper|9|ship}}
- {{sclass|Redoutable|submarine (1931)|1}}
- {{sclass|Redoutable|submarine (1967)|1}}
class="wikitable nowraplinks" |
Param
! Wikicode ! Result ! /sandbox ! note |
---|
None
| {{Sclass|Redoutable|submarine}} | {{sclass/sandbox|Redoutable|submarine}} | Default |
0
| {{Sclass|Redoutable|submarine|0|1967}} | {{sclass/sandbox|Redoutable|submarine|0|1967}} | Adjectival form |
1
| {{Sclass|Redoutable|submarine|1|1967}} | {{sclass/sandbox|Redoutable|submarine|1|1967}} | Article title |
2
| | {{Sclass|Redoutable|submarine|2|1967}} | {{sclass/sandbox|Redoutable|submarine|2|1967}} | When the ship type article does not exist |
3
| {{Sclass|Redoutable|submarine|3|1967}} | {{sclass/sandbox|Redoutable|submarine|3|1967}} | Same as default |
4
| {{Sclass|Redoutable|submarine|4|1967}} | {{sclass/sandbox|Redoutable|submarine|4|1967}} | Noun form |
5
| {{Sclass|Redoutable|submarine|5|1967}} | {{sclass/sandbox|Redoutable|submarine|5|1967}} | Table or chart form |
6
| {{Sclass|Redoutable|submarine|6|1967}} | {{sclass/sandbox|Redoutable|submarine|6|1967}} | {{!xt |Deprecated}} Use option 1 |
9
| {{Sclass|Redoutable|submarine|9|1967}} | {{sclass/sandbox|Redoutable|submarine|9|1967}} | (show target) |
= 5 =
;DAB-5=1939
- target: King George V-class battleship (1939)
- opt9: {{Sclass/sandbox|King George V|battleship|9||1939}}
{{Sclass|King George V|battleship|x||1939}}
: Target article: King George V-class battleship (1939)
: DAB article: King George V-class battleship
class="wikitable nowraplinks" |
Param
! Wikicode ! Result ! /sandbox ! note |
---|
None
| | {{Sclass|King George V|battleship}} | {{sclass/sandbox|King George V|battleship}} | Default |
0
| {{Sclass|King George V|battleship|0||1939}} | {{sclass/sandbox|King George V|battleship|0||1939}} | Adjectival form |
1
| | {{Sclass|King George V|battleship|1||1939}} | {{sclass/sandbox|King George V|battleship|1||1939}} | Article title |
2
| | {{Sclass|King George V|battleship|2||1939}} | {{sclass/sandbox|King George V|battleship|2||1939}} | When the ship type article does not exist |
3
| | {{Sclass|King George V|battleship|3||1939}} | {{sclass/sandbox|King George V|battleship|3||1939}} | Same as default |
4
| {{Sclass|King George V|battleship|4||1939}} | {{sclass/sandbox|King George V|battleship|4||1939}} | Noun form |
5
| {{Sclass|King George V|battleship|5||1939}} | {{sclass/sandbox|King George V|battleship|5||1939}} | Table or chart form |
6
| | {{Sclass|King George V|battleship|6||1939}} | {{sclass/sandbox|King George V|battleship|6||1939}} | {{!xt |Deprecated}} Use option 1 |
9
| | {{Sclass|King George V|battleship|9||1939}} | {{sclass/sandbox|King George V|battleship|9||1939}} | (show target) |
Sclass2
= Basic2 (1, 2) =
- {{Sclass2|}}
:{{Sclass2|Flower |corvette}}
= Errors2 =
{{sclass2|Tribal|destroyer|1||1905}}
Flower corvette
class="wikitable" style="font-size:90%" | ||||
1, 2 missing | {{Sclass2|One | 3=3}} | {{Sclass2/sandbox|One | 3=3}} |
{{Sclass2 | Two|3=3}} | {{Sclass2/sandbox | Two|3=3}} | |
3 is unk2, 6 | {{Sclass2|Flower|corvette|6}} | {{Sclass2/sandbox|Flower|corvette|6}} | ||
{{Sclass2|Flower|corvette|99}} | {{Sclass2/sandbox|Flower|corvette|99}} | |||
{{Sclass2|Flower|corvette|xyz}} | {{Sclass2/sandbox|Flower|corvette|xyz}} | |||
{{tl|Sclass2}}: nonhyphen is R target: Flower class corvette | {{Sclass2|Flower|corvette}} | {{Sclass2/sandbox|Flower|corvette}} | |||
show DABs, target: King George V-class battleship (1939)
| {{Sclass2|Tribal|destroyer|9|dab4|1905}} | {{Sclass2/sandbox|Tribal|destroyer|9|dab4|1905}} |
= Format2 (3) =
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: {{!xt |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}}
class="wikitable nowraplinks" |
Param
! Wikicode ! Result ! /sandbox ! note |
---|
None
| {{Sclass2|Flower|corvette}} | {{sclass2/sandbox|Flower|corvette}} | Default |
0
| {{Sclass2|Flower|corvette|0}} | {{sclass2/sandbox|Flower|corvette|0}} | Adjectival form |
1
| {{Sclass2|Flower|corvette|1}} | {{sclass2/sandbox|Flower|corvette|1}} | Article title |
2
| | {{Sclass2|Flower|corvette|2}} | {{sclass2/sandbox|Flower|corvette|2}} | When the ship type article does not exist |
3
| {{Sclass2|Flower|corvette|3}} | {{sclass2/sandbox|Flower|corvette|3}} | Same as default |
4
| {{Sclass2|Flower|corvette|4}} | {{sclass2/sandbox|Flower|corvette|4}} | Noun form |
5
| | {{Sclass2|Flower|corvette|5}} | {{sclass2/sandbox|Flower|corvette|5}} | Table or chart form |
6
| {{Sclass2|Flower|corvette|6}} | {{sclass2/sandbox|Flower|corvette|6}} | {{!xt |Deprecated}} Use Option 1 |
= DAB2 (4, 5) =
{{sclass2|Tribal|destroyer|1||1905}} - {{sclass2|Tribal|destroyer|1||1905}}
: {{sclass2/sandbox|Tribal|destroyer|1||1905}}
- {{sclass2|Tribal|destroyer|9||1905}}
: {{sclass2/sandbox|Tribal|destroyer|9||1905}}