|
|
|
@ -17,7 +17,7 @@ describe("Version module", function()
|
|
|
|
|
it("should get current version", function()
|
|
|
|
|
assert.is_true(12 == tostring(Version:getNormalizedCurrentVersion()):len())
|
|
|
|
|
end)
|
|
|
|
|
it("should get version", function()
|
|
|
|
|
it("should get version with 7-character hash", function()
|
|
|
|
|
local rev = "v2015.11-982-g704d4238"
|
|
|
|
|
local version, commit = Version:getNormalizedVersion(rev)
|
|
|
|
|
local expected_version = 201511000982
|
|
|
|
@ -25,6 +25,14 @@ describe("Version module", function()
|
|
|
|
|
assert.are.same(expected_version, version)
|
|
|
|
|
assert.are.same(expected_commit, commit)
|
|
|
|
|
end)
|
|
|
|
|
it("should get version with 8-character hash", function()
|
|
|
|
|
local rev = "v2021.05-70-gae544b74"
|
|
|
|
|
local version, commit = Version:getNormalizedVersion(rev)
|
|
|
|
|
local expected_version = 202105000070
|
|
|
|
|
local expected_commit = "ae544b74"
|
|
|
|
|
assert.are.same(expected_version, version)
|
|
|
|
|
assert.are.same(expected_commit, commit)
|
|
|
|
|
end)
|
|
|
|
|
it("should get version with four number revision", function()
|
|
|
|
|
local rev = "v2015.11-1755-gecd7b5b_2018-07-02"
|
|
|
|
|
local version, commit = Version:getNormalizedVersion(rev)
|
|
|
|
|