mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
tests: fix EPUB test (#11776)
The `droid sans fallback` test incorrectly assumes `Droid Sans Mono` will be the first font in the list of fallback fonts, but the list is alphabetically sorted. Cf. https://github.com/koreader/koreader/pull/10566
This commit is contained in:
@@ -67,7 +67,14 @@ describe("EPUB document module", function()
|
||||
end)
|
||||
it("should register droid sans fallback", function()
|
||||
local face_list = cre.getFontFaces()
|
||||
assert.is_equal(face_list[1], "Droid Sans Mono")
|
||||
local has_droid_sans = false
|
||||
for i, v in ipairs(face_list) do
|
||||
if v == "Droid Sans Mono" then
|
||||
has_droid_sans = true
|
||||
break
|
||||
end
|
||||
end
|
||||
assert.is_true(has_droid_sans)
|
||||
assert.is_true(#face_list >= 10)
|
||||
end)
|
||||
it("should close document", function()
|
||||
|
||||
Reference in New Issue
Block a user