mirror of
https://github.com/Dadido3/go-typst.git
synced 2025-11-20 11:49:36 +00:00
Circumvent test failures with older versions of Typst
This commit is contained in:
parent
83d5fc35ea
commit
9536d6510e
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user