ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਮੌਡਿਊਲ:ConvertTestcase/doc

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਆਜ਼ਾਦ ਵਿਸ਼ਵਕੋਸ਼ ਤੋਂ

This is the documentation page for ਮੌਡਿਊਲ:ConvertTestcase

This module allows testing of module:convert. Current testcases are listed at Template:Convert/testcases.

Here's an example test for {{convert|100|in|cm|disp=sqbr}}. You take the "100|in|cm|abbr=out|disp=sqbr" and change the | to ! and then pass it over to ConvertTestcaseGiven as below.

  • Adding a single row: {{#invoke:ConvertTestcase|ConvertTestcaseGiven|1=100!in!cm!disp=sqbr}}
Convert Code Convert (Old) Convert (Sandboxlua) Result
{{convert|100|in|cm|disp=sqbr}} 100 inches [250 cm] 100 inches [250 cm] Exact Match


color codes

[ਸੋਧੋ]
Code Description
Exact Match Means an exact match (apart from possible non-visible HTML differences)
Link Means that one of the links of the units if different between the two versions being tested.
Span Means that there are some differences in the HTML spans used in the HTML code. Should be investigated to determine if the difference is relevant.
Link & Span There are both Link and Span differences
Different There is a difference between the two versions. Should be investigated to determine which version is better.
A blank is shown if there is an error in the template version.

There are some problems using Module:UnitTests though. Visually the results are the same a lot of the time but they never match as there is slightly different HTML behind the scenes with   being placed in slightly different places. -- WOSlinker (talk) 19:46, 21 September 2013 (UTC)