diff options
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/ExternalData/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/Module/ExternalData/Data5/CMakeLists.txt | 22 | ||||
-rw-r--r-- | Tests/Module/ExternalData/Data5/Data5Check.cmake | 4 |
3 files changed, 27 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt index f07ab71..1018dd8 100644 --- a/Tests/Module/ExternalData/CMakeLists.txt +++ b/Tests/Module/ExternalData/CMakeLists.txt @@ -53,4 +53,5 @@ ExternalData_Add_Target(Data1) add_subdirectory(Data2) add_subdirectory(Data3) add_subdirectory(Data4) +add_subdirectory(Data5) add_subdirectory(DataNoSymlinks) diff --git a/Tests/Module/ExternalData/Data5/CMakeLists.txt b/Tests/Module/ExternalData/Data5/CMakeLists.txt new file mode 100644 index 0000000..13c7fab --- /dev/null +++ b/Tests/Module/ExternalData/Data5/CMakeLists.txt @@ -0,0 +1,22 @@ +# Test adding the same data file in multiple tests +ExternalData_Add_Test(Data5.A + NAME Data5Check.A + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.A) +ExternalData_Add_Test(Data5.B + NAME Data5Check.B + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.B) +ExternalData_Add_Test(Data5.C + NAME Data5Check.C + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.C) diff --git a/Tests/Module/ExternalData/Data5/Data5Check.cmake b/Tests/Module/ExternalData/Data5/Data5Check.cmake new file mode 100644 index 0000000..4dea9a4 --- /dev/null +++ b/Tests/Module/ExternalData/Data5/Data5Check.cmake @@ -0,0 +1,4 @@ +file(STRINGS "${Data5}" lines LIMIT_INPUT 1024) +if(NOT "x${lines}" STREQUAL "xInput file already transformed.") + message(SEND_ERROR "Input file:\n ${Data5}\ndoes not have expected content, but [[${lines}]]") +endif() |