commit 1dbc50a30d34c4e394ffad06715a88af444ade62
Author: Kornel Benko <[email protected]>
Date:   Mon Jul 20 16:55:28 2020 +0200

    Cmake tests: Add check of the exported docbook file with xmllint
---
 development/autotests/export.cmake |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/development/autotests/export.cmake 
b/development/autotests/export.cmake
index c776665..33a4525 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -219,12 +219,17 @@ else()
       Summary(_err "Expected result file \"${result_file_name}\" does not 
exists")
     else()
       message(STATUS "Expected result file \"${result_file_name}\" exists")
-      if (format MATCHES "xhtml")
+      if (extension MATCHES "^x(ht)?ml$")
+       if (format MATCHES "xhtml")
+         set(xmllint_params --sax --html --valid)
+       else()
+         set(xmllint_params --sax --valid)
+       endif()
         if (XMLLINT_EXECUTABLE)
-          message(STATUS "Calling: ${XMLLINT_EXECUTABLE} --sax --html --valid")
+          message(STATUS "Calling: ${XMLLINT_EXECUTABLE} " ${xmllint_params})
           # check the created xhtml file
           execute_process(
-            COMMAND ${XMLLINT_EXECUTABLE} --sax --html --valid  
"${result_file_name}"
+            COMMAND ${XMLLINT_EXECUTABLE} ${xmllint_params}  
"${result_file_name}"
             OUTPUT_VARIABLE xmlout
             ERROR_VARIABLE xmlerr
             RESULT_VARIABLE _err)
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to