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

From Kerbal Space Program Wiki
Jump to: navigation, search
(+missing conversions; +two tests for a quick check;)
(!tests;)
Line 18: Line 18:
  
 
== Tests ==
 
== Tests ==
* Current: {{#ifeq: {{Check version/Rev|{{Check version/ver|{{Check version/Cur}}}}}}|{{Check version/Cur}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
+
* Current: {{#ifeq: {{Check version/ver|{{Check version/Rev|{{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!}}
+
* Future (rev + 1): {{#ifeq: {{Check version/Rev|{{Check version/ver|{{#expr:{{Check version/Rev|{{Check version/Cur}}}} + 1}}}}}}|{{#expr: {{Check version/Rev|{{Check version/Cur}}}} + 1}}|{{ColorBox|green}} Ok!|{{ColorBox|red}} Failure!}}
  
 
[[Category:Metatemplates]]</noinclude>
 
[[Category:Metatemplates]]</noinclude>

Revision as of 13:00, 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:     Ok!
  • Future (rev + 1):     Ok!