To reproduce some bugs, tests need to open an existing LyX file. This
is now possible with CMake and is consistent with testing under
autotools in the sense that the .lyx file is referred to in the test
by being in the parent directory.
If the test is named bug-XXXX-in.txt and there exists a file
bug-XXXX.lyx, that file will be copied to the parent directory of
out-home in the build directory.
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove -f ${_testfiles} )
endif()
+string(REGEX REPLACE "-in\\.(txt|sh)$" "" _jj ${KEYTEST_INFILE})
+if(EXISTS "${AUTOTEST_ROOT}/${_jj}.lyx")
+ configure_file("${AUTOTEST_ROOT}/${_jj}.lyx" "${WORKDIR}/../${_jj}.lyx" COPYONLY)
+endif()
execute_process(
COMMAND python ${KEYTEST}
RESULT_VARIABLE KEYTEST_RES)