Template:Infobox person/length/testcases

From blackwiki
Jump to navigation Jump to search

The following tests compare the output of:

  1. {{Infobox person/length}}, implemented via Module:Person length since 7 October 2019
  2. {{Infobox person/length/sandbox}}, using Module:Person length/sandbox
  3. {{Infobox person/length/sandbox2}}, a copy of template prior to creation of Lua module

Template:Template see also

cm

1 centimetre

{{Infobox person/length}}

1 cm (0 in)

{{Infobox person/length/sandbox}}

1 cm (0 in)

{{Infobox person/length/sandbox2}}

1 cm (0 in)

1 centimeter

{{Infobox person/length}}

1 cm (0 in)

{{Infobox person/length/sandbox}}

1 cm (0 in)

{{Infobox person/length/sandbox2}}

1 cm (0 in)

198 centimetres

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

198 centimeters

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

198 cm

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

198 cms

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

198 cm.

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

m

1 metre

{{Infobox person/length}}

1 m (39 in)

{{Infobox person/length/sandbox}}

1 m (39 in)

{{Infobox person/length/sandbox2}}

1 m (39 in)

1 meter

{{Infobox person/length}}

1 m (39 in)

{{Infobox person/length/sandbox}}

1 m (39 in)

{{Infobox person/length/sandbox2}}

1 m (39 in)

1.98 metres

{{Infobox person/length}}

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

{{Infobox person/length}}

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

{{Infobox person/length}}

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

{{Infobox person/length}}

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.

{{Infobox person/length}}

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

{{Infobox person/length}}

1 in (3 cm)

{{Infobox person/length/sandbox}}

1 in (3 cm)

{{Infobox person/length/sandbox2}}

1 in (3 cm)

78 inches

{{Infobox person/length}}

78 in (198 cm)

{{Infobox person/length/sandbox}}

78 in (198 cm)

{{Infobox person/length/sandbox2}}

78 in (198 cm)

78 in

{{Infobox person/length}}

78 in (198 cm)

{{Infobox person/length/sandbox}}

78 in (198 cm)

{{Infobox person/length/sandbox2}}

78 in (198 cm)

78 ins

{{Infobox person/length}}

78 in (198 cm)

{{Infobox person/length/sandbox}}

78 in (198 cm)

{{Infobox person/length/sandbox2}}

78 in (198 cm)

78 in.

{{Infobox person/length}}

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

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

1.98metres

{{Infobox person/length}}

1.98 m (78 in)

{{Infobox person/length/sandbox}}

1.98 m (78 in)

{{Infobox person/length/sandbox2}}

1.98 m (78 in)

78inches

{{Infobox person/length}}

78 in (198 cm)

{{Infobox person/length/sandbox}}

78 in (198 cm)

{{Infobox person/length/sandbox2}}

78 in (198 cm)

  after number

198 centimetres

{{Infobox person/length}}

198 cm (78 in)

{{Infobox person/length/sandbox}}

198 cm (78 in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)

1.98 metres

{{Infobox person/length}}

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

{{Infobox person/length}}

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)

{{Infobox person/length}}

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)

{{Infobox person/length}}

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>

{{Infobox person/length}}

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>

{{Infobox person/length}}

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>

{{Infobox person/length}}

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>

{{Infobox person/length}}

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]

  1. citation goes here
  2. 78 ins
  3. "title". work.
  4. "centimetres". inches.

convert template as input

{{convert|78|in|cm|0}} → 78 inches (198 cm)
{{Infobox person/length|78 inches (198&nbsp;cm)}}

{{Infobox person/length}}

78 in (198 cm)
78 in (198&nbsp;cm)

{{Infobox person/length/sandbox}}

78 in (198 cm)
78 in (198&nbsp;cm)

{{Infobox person/length/sandbox2}}

78 in (198 cm)
78 in (198&nbsp;cm)
{{convert|78|in|m|2}} → 78 inches (1.98 m)
{{Infobox person/length|78 inches (1.98&nbsp;m)}}

{{Infobox person/length}}

78 in (1.98 m)
78 in (1.98&nbsp;m)

{{Infobox person/length/sandbox}}

78 in (1.98 m)
78 in (1.98&nbsp;m)

{{Infobox person/length/sandbox2}}

78 in (1.98 m)
78 in (1.98&nbsp;m)
{{convert|198|cm}} → 198 centimetres (78 in)
{{Infobox person/length|198 centimetres (78&nbsp;in)}}

{{Infobox person/length}}

198 cm (78 in)
198 cm (78&nbsp;in)

{{Infobox person/length/sandbox}}

198 cm (78 in)
198 cm (78&nbsp;in)

{{Infobox person/length/sandbox2}}

198 cm (78 in)
198 cm (78&nbsp;in)
{{convert|1.98|m|in}} → 1.98 metres (78 in)
{{Infobox person/length|1.98 metres (78&nbsp;in)}}

{{Infobox person/length}}

1.98 m (78 in)
1.98 m (78&nbsp;in)

{{Infobox person/length/sandbox}}

1.98 m (78 in)
1.98 m (78&nbsp;in)

{{Infobox person/length/sandbox2}}

1.98 m (78 in)
1.98 m (78&nbsp;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&nbsp;[[inch|in]] (198&nbsp;[[Centimetre|cm]])}}

{{Infobox person/length}}

78 in (198 cm)
78&nbsp;[[inch|in]] (198&nbsp;[[Centimetre|cm]])

{{Infobox person/length/sandbox}}

78 in (198 cm)
78&nbsp;[[inch|in]] (198&nbsp;[[Centimetre|cm]])

{{Infobox person/length/sandbox2}}

78 in (198 cm)
78&nbsp;[[inch|in]] (198&nbsp;[[Centimetre|cm]])
{{convert|78|in|m|2|abbr=on|lk=on}} → 78 in (1.98 m)
{{Infobox person/length|78&nbsp;[[inch|in]] (1.98&nbsp;[[Metre|m]])}}

{{Infobox person/length}}

78 in (1.98 m)
78&nbsp;[[inch|in]] (1.98&nbsp;[[Metre|m]])

{{Infobox person/length/sandbox}}

78 in (1.98 m)
78&nbsp;[[inch|in]] (1.98&nbsp;[[Metre|m]])

{{Infobox person/length/sandbox2}}

78 in (1.98 m)
78&nbsp;[[inch|in]] (1.98&nbsp;[[Metre|m]])
{{convert|198|cm|abbr=on|lk=on}} → 198 cm (78 in)
{{Infobox person/length|198&nbsp;[[Centimetre|cm]] (78&nbsp;[[inch|in]])}}

{{Infobox person/length}}

198 cm (78 in)
198&nbsp;[[Centimetre|cm]] (78&nbsp;[[inch|in]])

{{Infobox person/length/sandbox}}

198 cm (78 in)
198&nbsp;[[Centimetre|cm]] (78&nbsp;[[inch|in]])

{{Infobox person/length/sandbox2}}

198 cm (78 in)
198&nbsp;[[Centimetre|cm]] (78&nbsp;[[inch|in]])
{{convert|1.98|m|in|abbr=on|lk=on}} → 1.98 m (78 in)
{{Infobox person/length|1.98&nbsp;[[Metre|m]] (78&nbsp;[[inch|in]])}}

{{Infobox person/length}}

1.98 m (78 in)
1.98&nbsp;[[Metre|m]] (78&nbsp;[[inch|in]])

{{Infobox person/length/sandbox}}

1.98 m (78 in)
1.98&nbsp;[[Metre|m]] (78&nbsp;[[inch|in]])

{{Infobox person/length/sandbox2}}

1.98 m (78 in)
1.98&nbsp;[[Metre|m]] (78&nbsp;[[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)}}

{{Infobox person/length}}

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)}}

{{Infobox person/length}}

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]])}}

{{Infobox person/length}}

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]])}}

{{Infobox person/length}}

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)

{{Infobox person/length}}

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)

{{Infobox person/length}}

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)

{{Infobox person/length}}

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)

{{Infobox person/length}}

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)}}

{{Infobox person/length}}

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]])}}

{{Infobox person/length}}

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]])}}

{{Infobox person/length}}

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)}}

{{Infobox person/length}}

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

{{Infobox person/length}}

198 Centim

{{Infobox person/length/sandbox}}

198 Centim

{{Infobox person/length/sandbox2}}

198 Centim

198 CM

{{Infobox person/length}}

198 CM

{{Infobox person/length/sandbox}}

198 CM

{{Infobox person/length/sandbox2}}

198 CM

1.98 Metres

{{Infobox person/length}}

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".