[spec] version_spec: forget about rev and commit (#4303)

Stable doesn't have them.
pull/4304/head
Frans de Jonge 6 years ago committed by GitHub
parent 349485e240
commit 42548939bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,16 +6,12 @@ describe("Version module", function()
end)
it("should get current revision", function()
local rev = Version:getCurrentRevision()
local year, month, revision = rev:match("v(%d%d%d%d)%.(%d%d)-?(%d*)")
local commit = rev:match("-%d*-g(%x*)[%d_%-]*")
local year, month, point, revision = rev:match("v(%d%d%d%d)%.(%d%d).?(%d?)-?(%d*)") -- luacheck: ignore 211
local commit = rev:match("-%d*-g(%x*)[%d_%-]*") -- luacheck: ignore 211
assert.is_truthy(year)
assert.is_truthy(month)
assert.is_truthy(revision)
assert.is_truthy(commit)
assert.is_true(4 == year:len())
assert.is_true(2 == month:len())
assert.is_true(1 <= revision:len())
assert.is_true(7 <= commit:len())
end)
it("should get normalized current version", function()
assert.is_true(10 == tostring(Version:getNormalizedCurrentVersion()):len())

Loading…
Cancel
Save