Template:Infobox person/length/testcases
![]() | This is the template test cases page for the sandbox of Template:Infobox person/length. 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: |
The following tests compare the output of:
- {{Infobox person/length}}, implemented via Module:Person length since 7 October 2019
- {{Infobox person/length/sandbox}}, using Module:Person length/sandbox
- {{Infobox person/length/sandbox2}}, a copy of template prior to creation of Lua module
Contents
cm
1 centimetre |
---|
1 cm (0 in) {{Infobox person/length/sandbox}} 1 cm (0 in) {{Infobox person/length/sandbox2}} 1 cm (0 in) |
1 centimeter |
---|
1 cm (0 in) {{Infobox person/length/sandbox}} 1 cm (0 in) {{Infobox person/length/sandbox2}} 1 cm (0 in) |
198 centimetres |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
198 centimeters |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
198 cm |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
198 cms |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
198 cm. |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
m
1 metre |
---|
1 m (39 in) {{Infobox person/length/sandbox}} 1 m (39 in) {{Infobox person/length/sandbox2}} 1 m (39 in) |
1 meter |
---|
1 m (39 in) {{Infobox person/length/sandbox}} 1 m (39 in) {{Infobox person/length/sandbox2}} 1 m (39 in) |
1.98 metres |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
1.98 meters |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
1.98 m |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
1.98 ms |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
1.98 m. |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
in
1 inch |
---|
1 in (3 cm) {{Infobox person/length/sandbox}} 1 in (3 cm) {{Infobox person/length/sandbox2}} 1 in (3 cm) |
78 inches |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
78 in |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
78 ins |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
78 in. |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
missing space after number
198centimetres |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
1.98metres |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
78inches |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
after number
198 centimetres |
---|
198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in) |
1.98 metres |
---|
1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in) |
78 inches |
---|
78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm) |
text after length (year, reference)
198 cms (2012) |
---|
198 cm (78 in) (2012) {{Infobox person/length/sandbox}} 198 cm (78 in) (2012) {{Infobox person/length/sandbox2}} 198 cm (78 in) (2012) |
1.98 ms (2012) |
---|
1.98 m (78 in) (2012) {{Infobox person/length/sandbox}} 1.98 m (78 in) (2012) {{Infobox person/length/sandbox2}} 1.98 m (78 in) (2012) |
78 ins (2012)<ref>citation goes here</ref> |
---|
78 in (198 cm) (2012)[1] {{Infobox person/length/sandbox}} 78 in (198 cm) (2012)[1] {{Infobox person/length/sandbox2}} 78 in (198 cm) (2012)[1] |
78 ins (2012)<ref>78 ins</ref> |
---|
78 in (198 cm) (2012)[2] {{Infobox person/length/sandbox}} 78 in (198 cm) (2012)[2] {{Infobox person/length/sandbox2}} 78 in (198 cm) (2012)[2] |
78 ins (2012)<ref>"title". ''work''.</ref> |
---|
78 in (198 cm) (2012)[3] {{Infobox person/length/sandbox}} 78 in (198 cm) (2012)[3] {{Infobox person/length/sandbox2}} 78 in (198 cm) (2012)[3] |
78 ins (2012)<ref>{{cite news|title=centimetres|work=inches}}</ref> |
---|
78 in (198 cm) (2012)[4] {{Infobox person/length/sandbox}} 78 in (198 cm) (2012)[4] {{Infobox person/length/sandbox2}} 78 in (198 cm) (2012)[4] |
convert template as input
{{convert|78|in|cm|0}} → 78 inches (198 cm) |
---|
{{Infobox person/length|78 inches (198 cm)}}78 in (198 cm) 78 in (198 cm) {{Infobox person/length/sandbox}} 78 in (198 cm)78 in (198 cm) {{Infobox person/length/sandbox2}} 78 in (198 cm)78 in (198 cm) |
{{convert|78|in|m|2}} → 78 inches (1.98 m) |
---|
{{Infobox person/length|78 inches (1.98 m)}}78 in (1.98 m) 78 in (1.98 m) {{Infobox person/length/sandbox}} 78 in (1.98 m)78 in (1.98 m) {{Infobox person/length/sandbox2}} 78 in (1.98 m)78 in (1.98 m) |
{{convert|198|cm}} → 198 centimetres (78 in) |
---|
{{Infobox person/length|198 centimetres (78 in)}}198 cm (78 in) 198 cm (78 in) {{Infobox person/length/sandbox}} 198 cm (78 in)198 cm (78 in) {{Infobox person/length/sandbox2}} 198 cm (78 in)198 cm (78 in) |
{{convert|1.98|m|in}} → 1.98 metres (78 in) |
---|
{{Infobox person/length|1.98 metres (78 in)}}1.98 m (78 in) 1.98 m (78 in) {{Infobox person/length/sandbox}} 1.98 m (78 in)1.98 m (78 in) {{Infobox person/length/sandbox2}} 1.98 m (78 in)1.98 m (78 in) |
convert template as input, with abbreviated linked unit names
{{convert|78|in|cm|0|abbr=on|lk=on}} → 78 in (198 cm) |
---|
{{Infobox person/length|78 [[inch|in]] (198 [[Centimetre|cm]])}}78 in (198 cm) 78 [[inch|in]] (198 [[Centimetre|cm]]) {{Infobox person/length/sandbox}} 78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]]) {{Infobox person/length/sandbox2}} 78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]]) |
{{convert|78|in|m|2|abbr=on|lk=on}} → 78 in (1.98 m) |
---|
{{Infobox person/length|78 [[inch|in]] (1.98 [[Metre|m]])}}78 in (1.98 m) 78 [[inch|in]] (1.98 [[Metre|m]]) {{Infobox person/length/sandbox}} 78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]]) {{Infobox person/length/sandbox2}} 78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]]) |
{{convert|198|cm|abbr=on|lk=on}} → 198 cm (78 in) |
---|
{{Infobox person/length|198 [[Centimetre|cm]] (78 [[inch|in]])}}198 cm (78 in) 198 [[Centimetre|cm]] (78 [[inch|in]]) {{Infobox person/length/sandbox}} 198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]]) {{Infobox person/length/sandbox2}} 198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]]) |
{{convert|1.98|m|in|abbr=on|lk=on}} → 1.98 m (78 in) |
---|
{{Infobox person/length|1.98 [[Metre|m]] (78 [[inch|in]])}}1.98 m (78 in) 1.98 [[Metre|m]] (78 [[inch|in]]) {{Infobox person/length/sandbox}} 1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]]) {{Infobox person/length/sandbox2}} 1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]]) |
convert template as input, with unabbreviated linked unit names
{{convert|78|in|cm|0|abbr=off|lk=on}} → 78 inches (198 centimetres) |
---|
{{Infobox person/length|78 [[inch|inches]] (198 [[centimetre]]s)}}78 in (198 cm) 78 [[inch|in]] (198 [[Centimetre|cm]]) {{Infobox person/length/sandbox}} 78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]]) {{Infobox person/length/sandbox2}} 78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]]) |
{{convert|78|in|m|2|abbr=off|lk=on}} → 78 inches (1.98 metres) |
---|
{{Infobox person/length|78 [[inch|inches]] (1.98 [[metre]]s)}}78 in (1.98 m) 78 [[inch|in]] (1.98 [[Metre|m]]) {{Infobox person/length/sandbox}} 78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]]) {{Infobox person/length/sandbox2}} 78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]]) |
{{convert|198|cm|abbr=off|lk=on}} → 198 centimetres (78 inches) |
---|
{{Infobox person/length|198 [[centimetre]]s (78 [[inch|inches]])}}198 cm (78 in) 198 [[Centimetre|cm]] (78 [[inch|in]]) {{Infobox person/length/sandbox}} 198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]]) {{Infobox person/length/sandbox2}} 198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]]) |
{{convert|1.98|m|in|abbr=off|lk=on}} → 1.98 metres (78 inches) |
---|
{{Infobox person/length|1.98 [[metre]]s (78 [[inch|inches]])}}1.98 m (78 in) 1.98 [[Metre|m]] (78 [[inch|in]]) {{Infobox person/length/sandbox}} 1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]]) {{Infobox person/length/sandbox2}} 1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]]) |
Exceptions
Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
78 inches (191 centimeters) |
---|
78 in (191 cm) {{Infobox person/length/sandbox}} 78 in (191 cm) {{Infobox person/length/sandbox2}} 78 in (191 cm) |
78 inches (1.91 meters) |
---|
78 in (1.91 m) {{Infobox person/length/sandbox}} 78 in (1.91 m) {{Infobox person/length/sandbox2}} 78 in (1.91 m) |
198 centimetres (71 inches) |
---|
198 cm (71 in) {{Infobox person/length/sandbox}} 198 cm (71 in) {{Infobox person/length/sandbox2}} 198 cm (71 in) |
1.98 metres (71 inches) |
---|
1.98 m (71 in) {{Infobox person/length/sandbox}} 1.98 m (71 in) {{Infobox person/length/sandbox2}} 1.98 m (71 in) |
Does not replace numeric output of conversion templates such as {{convert}}, but does replace unit names with abbreviations (examples intentionally show different precision than usual):
{{convert|78|in|cm|1|abbr=off|sp=us}} → 78 inches (198.1 centimeters) |
---|
{{Infobox person/length|78 inches (198.1 centimeters)}}78 in (198.1 cm) 78 in (198.1 cm) {{Infobox person/length/sandbox}} 78 in (198.1 cm)78 in (198.1 cm) {{Infobox person/length/sandbox2}} 78 in (198.1 cm)78 in (198.1 cm) |
{{convert|78|in|m|3|abbr=off|sp=us|lk=on}} → 78 inches (1.981 meters) |
---|
{{Infobox person/length|78 [[inch|inches]] (1.981 [[Metre|meters]])}}78 in (1.981 m) 78 [[inch|in]] (1.981 [[Metre|m]]) {{Infobox person/length/sandbox}} 78 in (1.981 m)78 [[inch|in]] (1.981 [[Metre|m]]) {{Infobox person/length/sandbox2}} 78 in (1.981 m)78 [[inch|in]] (1.981 [[Metre|m]]) |
{{convert|198|cm|in|2|abbr=off|lk=on}} → 198 centimetres (77.95 inches) |
---|
{{Infobox person/length|198 [[centimetre]]s (77.95 [[inch|inches]])}}198 cm (77.95 in) 198 [[Centimetre|cm]] (77.95 [[inch|in]]) {{Infobox person/length/sandbox}} 198 cm (77.95 in)198 [[Centimetre|cm]] (77.95 [[inch|in]]) {{Infobox person/length/sandbox2}} 198 cm (77.95 in)198 [[Centimetre|cm]] (77.95 [[inch|in]]) |
{{convert|1.98|m|in|2|abbr=off}} → 1.98 metres (77.95 inches) |
---|
{{Infobox person/length|1.98 metres (77.95 inches)}}1.98 m (77.95 in) 1.98 m (77.95 in) {{Infobox person/length/sandbox}} 1.98 m (77.95 in)1.98 m (77.95 in) {{Infobox person/length/sandbox2}} 1.98 m (77.95 in)1.98 m (77.95 in) |
Areas for improvement
Conversion not displayed if unit name contains uppercase characters:
198 Centimetres |
---|
198 Centim {{Infobox person/length/sandbox}} 198 Centim {{Infobox person/length/sandbox2}} 198 Centim |
198 CM |
---|
198 CM {{Infobox person/length/sandbox}} 198 CM {{Infobox person/length/sandbox2}} 198 CM |
1.98 Metres |
---|
1.98 Metres {{Infobox person/length/sandbox}} 1.98 Metres {{Infobox person/length/sandbox2}} 1.98 Metres |
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Conversion not displayed if symbols are used for inches:
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Does not recognize symbols for inches in manually entered conversion (adds second conversion):
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Does not convert feet (ft) or yards (yd):
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
If {{convert}} template displays feet or yards, it is not abbreviated:
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
If {{convert}} displays feet or yards in conversion, a second conversion is displayed (only for unlinked unit names):
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".
Lua error: Internal error: The interpreter has terminated with signal "24". Lua error: Internal error: The interpreter has terminated with signal "24".