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
reviewable/pr11737/r8^2
Benoit Pierre 2 weeks ago committed by GitHub
parent 8530282d38
commit 821120828b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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()

Loading…
Cancel
Save