The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit ebddec15de6c4c807c18f6dac2b4f0cc94c3b642
Author: Kornel Benko <[email protected]>
Date:   Tue May 14 11:17:50 2013 +0200

    Add test for Layout::write() on cmake too
    (For now runns only on unix platforms using gcc)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ac0ca1a..07541ba 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -185,3 +185,4 @@ if(LYX_BUNDLE)
                        fixup_bundle(\"${installed_lyx}\" \"\" \"\") " 
COMPONENT RUNTIME)
 endif()
 
+add_subdirectory(tests)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 0000000..5ba9f3d
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,28 @@
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# Copyright (c) 2013 Kornel Benko [email protected]
+#
+
+set(check_Layout_SOURCES)
+foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp
+       FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp
+       ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_Layout.cpp
+       support/tests/boost.cpp support/tests/dummy_functions.cpp)
+  list(APPEND check_Layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
+endforeach()
+
+add_definitions(-DNO_LAYOUT_CSS)
+add_executable(check_Layout ${check_Layout_SOURCES})
+set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} 
-Wl,--allow-multiple-definition")
+target_link_libraries(check_Layout support ${QT_QTMAIN_LIBRARY})
+add_dependencies(lyx_run_tests check_Layout)
+
+file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" 
"${TOP_SRC_DIR}/lib/layouts/*.layout")
+list(SORT layout_files)
+foreach(bns ${layout_files}) 
+  string(REPLACE ".layout" "" bn ${bns})
+
+  add_test(NAME "check_Layout/${bns}"
+    COMMAND check_Layout "${TOP_SRC_DIR}/lib/layouts/${bn}")
+endforeach()

-----------------------------------------------------------------------

Summary of changes:
 src/CMakeLists.txt       |    1 +
 src/tests/CMakeLists.txt |   28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 src/tests/CMakeLists.txt


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to