From 42548939bc0e8a1e6d276f9079ad7d05d79a3b6e Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Fri, 2 Nov 2018 21:12:00 +0100 Subject: [PATCH] [spec] version_spec: forget about rev and commit (#4303) Stable doesn't have them. --- spec/unit/version_spec.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/unit/version_spec.lua b/spec/unit/version_spec.lua index c114aa63f..8ef8266f3 100644 --- a/spec/unit/version_spec.lua +++ b/spec/unit/version_spec.lua @@ -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())