Skip to content

Commit

Permalink
tests: fix EPUB test (#11776)
Browse files Browse the repository at this point in the history
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. #10566
  • Loading branch information
benoit-pierre committed May 8, 2024
1 parent 8530282 commit 8211208
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/unit/document_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8211208

Please sign in to comment.