2
0
mirror of https://github.com/koreader/koreader synced 2024-11-18 03:25:46 +00:00

tests: fix EPUB test (#10566)

Otherwise the test fail in my environment because of some user fonts.
This commit is contained in:
Benoit Pierre 2023-06-11 20:20:46 +00:00 committed by GitHub
parent bb7ae20697
commit c95b17410b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,20 +72,9 @@ describe("EPUB document module", function()
assert.is_equal(doc:fastDigest(), "59d481d168cca6267322f150c5f6a2a3")
end)
it("should register droid sans fallback", function()
local fonts_registry = {
"Droid Sans Mono",
"FreeSans",
"FreeSerif",
"Noto Naskh Arabic",
"Noto Sans",
"Noto Sans Arabic UI",
"Noto Sans Bengali UI",
"Noto Sans CJK SC",
"Noto Sans Devanagari UI",
"Noto Serif",
}
local face_list = cre.getFontFaces()
assert.are.same(fonts_registry, face_list)
assert.is_equal(face_list[1], "Droid Sans Mono")
assert.is_true(#face_list >= 10)
end)
it("should close document", function()
doc:close()