From 983d327fe3bbf8cdc8dbb1e56bbb78ba7e3fbcd5 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Mon, 8 Feb 2021 11:35:27 +0100 Subject: [PATCH] Cmake export tests: Add epub-format to be tested --- development/autotests/ExportTests.cmake | 12 +++++++----- development/autotests/export.cmake | 4 ++-- development/autotests/useSystemFonts.pl | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake index 18b98fd6c5..60d813b48d 100644 --- a/development/autotests/ExportTests.cmake +++ b/development/autotests/ExportTests.cmake @@ -59,24 +59,26 @@ macro(getoutputformats filepath varname format_set) file(STRINGS "${filepath}" lines) # What should we test, if default_output_format is not defined? # For now we test everything ... - set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS}) + set(out_formats "xhtml" "docbook5" "epub" ${DVI_FORMATS} ${PDF_FORMATS}) foreach(_l IN LISTS lines) if(_l MATCHES "^\\\\default_output_format +\([^ ]+\)") set(_format ${CMAKE_MATCH_1}) if(_format STREQUAL "default") - set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS}) + set(out_formats "xhtml" "docbook5" "epub" ${DVI_FORMATS} ${PDF_FORMATS}) else() set(${format_set} ${_format}) if(_format STREQUAL "pdf2" AND "${filepath}" MATCHES "/doc/") - set(out_formats "xhtml" "docbook5" ${DVI_FORMATS} ${PDF_FORMATS}) + set(out_formats "xhtml" "docbook5" "epub" ${DVI_FORMATS} ${PDF_FORMATS}) elseif(_format MATCHES "pdf$") - set(out_formats "xhtml" "docbook5" ${PDF_FORMATS}) + set(out_formats "xhtml" "docbook5" "epub" ${PDF_FORMATS}) elseif(_format MATCHES "dvi$") - set(out_formats "xhtml" "docbook5" ${DVI_FORMATS}) + set(out_formats "xhtml" "docbook5" "epub" ${DVI_FORMATS}) elseif(_format MATCHES "docbook5") set(out_formats "docbook5") elseif(_format MATCHES "xhtml") set(out_formats "xhtml") + elseif(_format MATCHES "epub") + set(out_formats "epub") else() # Respect all other output formats # like "eps3" diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index 4337ea6b95..43d6df8166 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -7,8 +7,8 @@ # LYX_ROOT = ${TOP_SRC_DIR}/lib/{doc,examples,templates,tabletemplates} # LYX_USERDIR_VER = Name of environment variable for the user directory # lyx = -# format = lyx16x|lyx20x|lyx21x|lyx22x|xhtml|docbook5 -# extension = 16.lyx|20.lyx|21.lyx|22.lyx|xhtml|xml +# format = lyx16x|lyx20x|lyx21x|lyx22x|xhtml|docbook5|epub +# extension = 16.lyx|20.lyx|21.lyx|22.lyx|xhtml|xml|epub # file = xxx # # Script should be called like: diff --git a/development/autotests/useSystemFonts.pl b/development/autotests/useSystemFonts.pl index c3e6a80274..1265d2003a 100644 --- a/development/autotests/useSystemFonts.pl +++ b/development/autotests/useSystemFonts.pl @@ -203,7 +203,7 @@ sub interpretedCopy($$$$) my $ext = $isrel[1]; if ($rStatus->{"filetype"} eq "prefix_only") { $f = getNewNameOf("$sourcedir/$f", $rFiles); - if ($format eq "docbook5") { + if ($format =~ /^(docbook5|epub)$/) { $rF->[1] = join(',', @{$filelist}); $l = join('', @$rF); } -- 2.39.5