Difference between revisions of "Template:Enum/testcases"
Jump to navigation
Jump to search
imported>SimonTrew m (→Testing main template: Show input for parameters (row 4 in each table) correctly (output is correct)) |
(tests) |
||
| Line 15: | Line 15: | ||
=== Defaults for named parameters === | === Defaults for named parameters === | ||
| − | { | + | {| class="wikitable" |
| − | | | + | ! Input || Output |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}}} || {{{{BASEPAGENAME}}|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|A}} || {{{{BASEPAGENAME}}|A}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|A|}} || {{{{BASEPAGENAME}}|A|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|A|B}} || {{{{BASEPAGENAME}}|A|B}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|A|B|}} || {{{{BASEPAGENAME}}|A|B|}} |
| − | + | |- | |
| + | |{{tlc|{{BASEPAGENAME}}|A|B|C}} || {{{{BASEPAGENAME}}|A|B|C}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|A|B|C|}} || {{{{BASEPAGENAME}}|A|B|C|}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|A|B|C|D}} || {{{{BASEPAGENAME}}|A|B|C|D}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|A|B|C|D|}} || {{{{BASEPAGENAME}}|A|B|C|D|}} | ||
| + | |} | ||
=== "after" parameter === | === "after" parameter === | ||
| − | { | + | {| class="wikitable" |
| − | | | + | ! Input || Output |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=after=.}} || {{{{BASEPAGENAME}}|after=.}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=}} || {{{{BASEPAGENAME}}|after=.|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A}} || {{{{BASEPAGENAME}}|after=.|A}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=}} || {{{{BASEPAGENAME}}|after=.|A|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=B}} || {{{{BASEPAGENAME}}|after=.|A|B}} |
| − | + | |- | |
| + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=B|5=C}} || {{{{BASEPAGENAME}}|after=.|A|B|C}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=B|5=C|6=}} || {{{{BASEPAGENAME}}|after=.|A|B|C|}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=B|5=C|6=D}} || {{{{BASEPAGENAME}}|after=.|A|B|C|D}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=after=.|3=A|4=B|5=C|6=D|7=}} || {{{{BASEPAGENAME}}|after=.|A|B|C|D|}} | ||
| + | |} | ||
=== "and" parameter === | === "and" parameter === | ||
| − | { | + | {| class="wikitable" |
| − | | | + | ! Input || Output |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=and=+}} || {{{{BASEPAGENAME}}|and=+}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=}} || {{{{BASEPAGENAME}}|and=+|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A}} || {{{{BASEPAGENAME}}|and=+|A}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=}} || {{{{BASEPAGENAME}}|and=+|A|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=B}} || {{{{BASEPAGENAME}}|and=+|A|B}} |
| − | + | |- | |
| + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=B|5=C}} || {{{{BASEPAGENAME}}|and=+|A|B|C}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=B|5=C|6=}} || {{{{BASEPAGENAME}}|and=+|A|B|C|}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=B|5=C|6=D}} || {{{{BASEPAGENAME}}|and=+|A|B|C|D}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=and=+|3=A|4=B|5=C|6=D|7=}} || {{{{BASEPAGENAME}}|and=+|A|B|C|D|}} | ||
| + | |} | ||
=== "comma" parameter === | === "comma" parameter === | ||
| − | { | + | {| class="wikitable" |
| − | | | + | ! Input || Output |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=comma=;}} || {{{{BASEPAGENAME}}|comma=;}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=}} || {{{{BASEPAGENAME}}|comma=;|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A}} || {{{{BASEPAGENAME}}|comma=;|A}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=}} || {{{{BASEPAGENAME}}|comma=;|A|}} |
| − | | | + | |- |
| − | | | + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=B}} || {{{{BASEPAGENAME}}|comma=;|A|B}} |
| − | + | |- | |
| + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=B|5=C}} || {{{{BASEPAGENAME}}|comma=;|A|B|C}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=B|5=C|6=}} || {{{{BASEPAGENAME}}|comma=;|A|B|C|}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=B|5=C|6=D}} || {{{{BASEPAGENAME}}|comma=;|A|B|C|D}} | ||
| + | |- | ||
| + | |{{tlc|{{BASEPAGENAME}}|2=comma=;|3=A|4=B|5=C|6=D|7=}} || {{{{BASEPAGENAME}}|comma=;|A|B|C|D|}} | ||
| + | |} | ||
Revision as of 06:49, 24 February 2015
| This is the template test cases page for the sandbox of Template:Enum. 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: |
Contents
Testing sandbox version
{{../sandbox}}
Testing main template
Defaults for named parameters
| Input | Output |
|---|---|
{{Enum}} |
|
{{Enum|A}} |
A |
{{Enum|A|}} |
A |
{{Enum|A|B}} |
A and B |
{{Enum|A|B|}} |
A and B |
{{Enum|A|B|C}} |
A, B and C |
{{Enum|A|B|C|}} |
A, B and C |
{{Enum|A|B|C|D}} |
A, B, C and D |
{{Enum|A|B|C|D|}} |
A, B, C and D |
"after" parameter
| Input | Output |
|---|---|
{{Enum|after=.}} |
|
{{Enum|after=.|}} |
|
{{Enum|after=.|A}} |
A. |
{{Enum|after=.|A|}} |
A. |
{{Enum|after=.|A|B}} |
A and B. |
{{Enum|after=.|A|B|C}} |
A, B and C. |
{{Enum|after=.|A|B|C|}} |
A, B and C. |
{{Enum|after=.|A|B|C|D}} |
A, B, C and D. |
{{Enum|after=.|A|B|C|D|}} |
A, B, C and D. |
"and" parameter
| Input | Output |
|---|---|
{{Enum|and=+}} |
|
{{Enum|and=+|}} |
|
{{Enum|and=+|A}} |
A |
{{Enum|and=+|A|}} |
A |
{{Enum|and=+|A|B}} |
A+B |
{{Enum|and=+|A|B|C}} |
A, B+C |
{{Enum|and=+|A|B|C|}} |
A, B+C |
{{Enum|and=+|A|B|C|D}} |
A, B, C+D |
{{Enum|and=+|A|B|C|D|}} |
A, B, C+D |
"comma" parameter
| Input | Output |
|---|---|
{{Enum|comma=;}} |
|
{{Enum|comma=;|}} |
|
{{Enum|comma=;|A}} |
A |
{{Enum|comma=;|A|}} |
A |
{{Enum|comma=;|A|B}} |
A and B |
{{Enum|comma=;|A|B|C}} |
A;B and C |
{{Enum|comma=;|A|B|C|}} |
A;B and C |
{{Enum|comma=;|A|B|C|D}} |
A;B;C and D |
{{Enum|comma=;|A|B|C|D|}} |
A;B;C and D |