mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[spec] version_spec: forget about rev and commit (#4303)
Stable doesn't have them.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user