Circumvent test failures with older versions of Typst

This commit is contained in:
David Vogel 2025-11-16 13:44:26 +00:00
parent 83d5fc35ea
commit 9536d6510e
2 changed files with 6 additions and 6 deletions

View File

@ -40,12 +40,12 @@ func TestCLI_Fonts(t *testing.T) {
func TestCLI_FontsWithOptions(t *testing.T) { func TestCLI_FontsWithOptions(t *testing.T) {
caller := typst.CLI{} caller := typst.CLI{}
result, err := caller.Fonts(&typst.OptionsFonts{IgnoreSystemFonts: true, IgnoreEmbeddedFonts: true}) result, err := caller.Fonts(&typst.OptionsFonts{IgnoreSystemFonts: true})
if err != nil { if err != nil {
t.Fatalf("Failed to get available fonts: %v.", err) t.Fatalf("Failed to get available fonts: %v.", err)
} }
if len(result) != 0 { if len(result) != 4 {
t.Errorf("Unexpected number of detected fonts. Got %d, want %d.", len(result), 0) t.Errorf("Unexpected number of detected fonts. Got %d, want %d.", len(result), 4)
} }
} }

View File

@ -39,12 +39,12 @@ func TestDocker_Fonts(t *testing.T) {
func TestDocker_FontsWithOptions(t *testing.T) { func TestDocker_FontsWithOptions(t *testing.T) {
caller := typst.Docker{} caller := typst.Docker{}
result, err := caller.Fonts(&typst.OptionsFonts{IgnoreSystemFonts: true, IgnoreEmbeddedFonts: true}) result, err := caller.Fonts(&typst.OptionsFonts{IgnoreSystemFonts: true})
if err != nil { if err != nil {
t.Fatalf("Failed to get available fonts: %v.", err) t.Fatalf("Failed to get available fonts: %v.", err)
} }
if len(result) != 0 { if len(result) != 4 {
t.Errorf("Unexpected number of detected fonts. Got %d, want %d.", len(result), 0) t.Errorf("Unexpected number of detected fonts. Got %d, want %d.", len(result), 4)
} }
} }