Difference between revisions of "Template:Check version/ver"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (!parameter name;)
(+missing conversions; +two tests for a quick check;)
Line 12: Line 12:
 
|48=0.90.0
 
|48=0.90.0
 
|49=1.0
 
|49=1.0
 +
|50=1.0.1
 +
|51=1.0.2
 +
|52=1.1
 
|#default={{{2|0}}}}}|{{Check version/Cur}}}}</includeonly><noinclude>This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Tl|Check version/Rev}}. It should return the version number used by Squad and <tt><nowiki>{{Check version/Rev|{{Check version/ver|X}}}} == X</nowiki></tt>.
 
|#default={{{2|0}}}}}|{{Check version/Cur}}}}</includeonly><noinclude>This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Tl|Check version/Rev}}. It should return the version number used by Squad and <tt><nowiki>{{Check version/Rev|{{Check version/ver|X}}}} == X</nowiki></tt>.
 +
 +
== Tests ==
 +
* Current: {{#ifeq: {{Check version/Rev|{{Check version/ver|{{Check version/Cur}}}}}}|{{Check version/Cur}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
 +
* Future (rev + 1): {{#ifeq: {{Check version/Rev|{{Check version/ver|{{#expr:{{Check version/Cur}} + 1}}}}}}|{{#expr: {{Check version/Cur}} + 1}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
  
 
[[Category:Metatemplates]]</noinclude>
 
[[Category:Metatemplates]]</noinclude>

Revision as of 12:56, 3 May 2015

This template converts a revision number into version number. Is only internally required. After each update the next version should be added to be in sync with {{Check version/Rev}}. It should return the version number used by Squad and {{Check version/Rev|{{Check version/ver|X}}}} == X.

Tests

  • Current:     Failure!
  • Future (rev + 1):     Failure!