mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
fc33092fd8
a) test export/templates/ectaart_pdf5 removed, because of incompatibility between ectart.cls and luatex.sty b) renamed some tests to reflect their purpose tex2lyx2lyx/roundtrip/ => tex2lyx/cmplyx/ # the tests are comparing files written by lyx (not by tex2lyx) autotests/ => keytest/ # we are testing reactions of lyx to some key strokes c) add tests for lyx2lyx. This is rather rudimental, in that it only checks for created output, error codes and error output. d) use correct environment variable to set up the userdir for testing
44 lines
1.1 KiB
CMake
Executable File
44 lines
1.1 KiB
CMake
Executable File
# This file is part of LyX, the document processor.
|
|
# Licence details can be found in the file COPYING.
|
|
#
|
|
# Copyright (c) 2013 Kornel Benko kornel@lyx.org
|
|
#
|
|
#
|
|
# LYX2LYX = ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx
|
|
# LYXFILE = xxx
|
|
#
|
|
# Script should be called like:
|
|
# cmake -DLYX2LYX=xxx \
|
|
# -DWORKDIR=${BUILD_DIR}/autotests/out-home \
|
|
# -DLYXFILE=xxx \
|
|
# -P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake"
|
|
#
|
|
|
|
message(STATUS "Executing ${LYX2LYX} -e errors -o output ${LYXFILE}")
|
|
execute_process(
|
|
COMMAND ${LYX2LYX} -e errors -o output ${LYXFILE}
|
|
RESULT_VARIABLE _err)
|
|
|
|
message(STATUS "Error output of lyx2lyx = ${_err}")
|
|
string(COMPARE NOTEQUAL ${_err} 0 _erg)
|
|
|
|
# Check file "errors" being empty
|
|
file(STRINGS "errors" foundErrors)
|
|
if(foundErrors)
|
|
set(_erg 1)
|
|
foreach(_l ${foundErrors})
|
|
message(STATUS "${_l}")
|
|
endforeach()
|
|
endif()
|
|
|
|
# Check file "output" being not empty
|
|
file(STRINGS "output" createdLyx)
|
|
if(NOT createdLyx)
|
|
set(_erg 1)
|
|
message(STATUS "Created file empty")
|
|
endif()
|
|
|
|
if(_erg)
|
|
message(FATAL_ERROR "lyx2lyx failed")
|
|
endif()
|