mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add Document:fastDigest method to calculate document hash without performance overhead
This commit is contained in:
@@ -28,6 +28,9 @@ describe("PDF document module", function()
|
||||
local clip1 = doc:clipPagePNGString(pos0, pos1, pboxes, "lighten")
|
||||
assert.truthy(clip1)
|
||||
end)
|
||||
it("should calculate fast digest", function()
|
||||
assert.is_equal(doc:fastDigest(), "41cce710f34e5ec21315e19c99821415")
|
||||
end)
|
||||
it("should close document", function()
|
||||
doc:close()
|
||||
end)
|
||||
@@ -45,6 +48,9 @@ describe("EPUB document module", function()
|
||||
assert.are.same(image:getWidth(), 442)
|
||||
assert.are.same(image:getHeight(), 616)
|
||||
end)
|
||||
it("should calculate fast digest", function()
|
||||
assert.is_equal(doc:fastDigest(), "59d481d168cca6267322f150c5f6a2a3")
|
||||
end)
|
||||
it("should close document", function()
|
||||
doc:close()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user