From 9d27dfb41cc6963e1c5dc0603e0766a6106a66ac Mon Sep 17 00:00:00 2001 From: remoteexception <35626357+remoteexception@users.noreply.github.com> Date: Thu, 9 Sep 2021 20:07:45 +0200 Subject: [PATCH] fix: add more supported file extensions for unovonv (#340) * Add supported file extensions for unovonv * Fix expected file extensions length Co-authored-by: Jana Storch --- pkg/modules/libreoffice/unoconv/unoconv.go | 3 +++ pkg/modules/libreoffice/unoconv/unoconv_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/modules/libreoffice/unoconv/unoconv.go b/pkg/modules/libreoffice/unoconv/unoconv.go index 9019d282..6385f3af 100644 --- a/pkg/modules/libreoffice/unoconv/unoconv.go +++ b/pkg/modules/libreoffice/unoconv/unoconv.go @@ -229,6 +229,7 @@ func (mod Unoconv) Extensions() []string { ".fodg", ".gif", ".jpg", + ".jpeg", ".met", ".odd", ".otg", @@ -243,9 +244,11 @@ func (mod Unoconv) Extensions() []string { ".swf", ".sxd", ".sxw", + ".tif", ".tiff", ".xhtml", ".xpm", + ".odp", ".fodp", ".potm", ".pot", diff --git a/pkg/modules/libreoffice/unoconv/unoconv_test.go b/pkg/modules/libreoffice/unoconv/unoconv_test.go index fd589ed5..3526f494 100644 --- a/pkg/modules/libreoffice/unoconv/unoconv_test.go +++ b/pkg/modules/libreoffice/unoconv/unoconv_test.go @@ -146,7 +146,7 @@ func TestUnoconv_Extensions(t *testing.T) { extensions := mod.Extensions() actual := len(extensions) - expect := 73 + expect := 76 if actual != expect { t.Errorf("expected %d extensions but got %d", expect, actual)