if("${_checktype}" STREQUAL "module")
file(WRITE "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "#% Do not delete the line below; configure depends on this\n")
file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "# \\DeclareLaTeXClass{test${bn}}\n")
-
file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Format 55\n")
file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Input ${bns}\n")
add_test(NAME "check_layout/${bns}"
- COMMAND env LYX_USERDIR_22x=${LYX_TESTS_USERDIR} $<TARGET_FILE:check_layout> "${LYX_TESTS_USERDIR}/layouts/test${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
+ COMMAND $<TARGET_FILE:check_layout> "${LYX_TESTS_USERDIR}/layouts/test${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
+ set_tests_properties("check_layout/${bns}" PROPERTIES ENVIRONMENT ${LYX_USERDIR_VER}=${LYX_TESTS_USERDIR})
else()
add_test(NAME "check_layout/${bns}"
COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
-P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
add_dependencies(lyx_run_tests check_ExternalTransforms)
-set(check_ExternalTransforms_SOURCES)
-foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp
- Length.cpp lengthcommon.cpp tests/check_ExternalTransforms.cpp
- tests/boost.cpp tests/dummy_functions.cpp)
- list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f})
-endforeach()
-
-include_directories(${TOP_SRC_DIR}/src/tests)
set(check_Length_SOURCES)
foreach(_f Length.cpp lengthcommon.cpp tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp)
list(APPEND check_Length_SOURCES ${TOP_SRC_DIR}/src/${_f})
-P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
add_dependencies(lyx_run_tests check_Length)
+include_directories(${TOP_SRC_DIR}/src/tests)
+set(check_ListingsCaption_SOURCES)
+foreach(_f tests/check_ListingsCaption.cpp tests/boost.cpp tests/dummy_functions.cpp)
+ list(APPEND check_ListingsCaption_SOURCES ${TOP_SRC_DIR}/src/${_f})
+endforeach()
+add_executable(check_ListingsCaption ${check_ListingsCaption_SOURCES})
+
+target_link_libraries(check_ListingsCaption support
+ ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
+lyx_target_link_libraries(check_ListingsCaption Magic)
+
+add_dependencies(lyx_run_tests check_ListingsCaption)
+set_target_properties(check_ListingsCaption PROPERTIES FOLDER "tests/src")
+target_link_libraries(check_ListingsCaption ${ICONV_LIBRARY})
+
+add_test(NAME "check_ListingsCaption"
+ COMMAND ${CMAKE_COMMAND} -DCommand=$<TARGET_FILE:check_ListingsCaption>
+ "-DInput=${TOP_SRC_DIR}/src/tests/regfiles/ListingsCaption"
+ "-DOutput=${CMAKE_CURRENT_BINARY_DIR}/ListingsCaption_data"
+ -P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
+add_dependencies(lyx_run_tests check_ListingsCaption)
+