Jump to content

Template:Gross tonnage/testcases

From Wikipedia, the free encyclopedia

The table below shows the similarities and differences between the original version and the proposed legacy compatible version. Differences are that the legacy compatible version does not include the word tons for |first=yes and |first=caps. This is because GT is a unitless specification referring to volume rather than mass.

Where the original version emitted an error message when |first= contained a unrecognized value, the legacy compatible version simply outputs the numeric value followed by an unlinked abbreviation.

The default output of the original version is linked. In the legacy compatible version it is not. This is to make this template and other similar templates have similar behavior.

All numeric values in the legacy compatible version are comma separated.

GT legacy test cases
Template Live version Sandbox legacy
{{GT|36000|first=yes}} 36,000 GT gross tonnage (GT) of 36,000
{{GT|36000|first=caps}} 36,000 GT Gross tonnage (GT) of 36,000
{{GT|36000|first=short}} 36,000 GT 36,000 GT (gross tonnage)
{{GT|36000}} 36,000 GT 36,000 GT
{{GT|36000|first=unknown value}} 36,000 GT 36,000 GT |first=unknown value
{{GT|36000|first=}} 36,000 GT 36,000 GT
GT new parameter test cases
Template Live version Sandbox version
{{GT|36000|disp=long}} 36,000 gross tonnage (GT) 36,000 gross tonnage (GT)
{{GT|36000|disp=long|link=off}} 36,000 gross tonnage (GT) 36,000 gross tonnage (GT)
{{GT|36000|disp=adj}} 36,000-gross tonnage (GT) 36,000-gross tonnage (GT)
{{GT|36000|disp=adj|link=off}} 36,000-gross tonnage (GT) 36,000-gross tonnage (GT)
{{GT|36000|disp=sam}} 36,000 GT |disp=sam 36,000 GT |disp=sam
{{GT|36000|disp=}} 36,000 GT 36,000 GT
{{GT|36000|disp=|link=off}} 36,000 GT 36,000 GT
{{GT|36000}} 36,000 GT 36,000 GT
{{GT|36000|link=off}} 36,000 GT 36,000 GT