summaryrefslogtreecommitdiffstats
path: root/Tests/Module/ExternalData
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-21 14:59:29 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-22 13:25:06 (GMT)
commit55f0148d7b2b5815add052d00b9835dd9c16feae (patch)
treea87b1e7b05667cbf54b1882e1eb3797794f37b14 /Tests/Module/ExternalData
parentd45eb35350abc72887784802f1e093ad1c4ff5b2 (diff)
downloadCMake-55f0148d7b2b5815add052d00b9835dd9c16feae.zip
CMake-55f0148d7b2b5815add052d00b9835dd9c16feae.tar.gz
CMake-55f0148d7b2b5815add052d00b9835dd9c16feae.tar.bz2
ExternalData: Test content link with a space in its name
Extend the Module.ExternalData test to cover a DATA{} reference whose name contains a space. Skip the case when the native build tool does not support spaces.
Diffstat (limited to 'Tests/Module/ExternalData')
-rw-r--r--Tests/Module/ExternalData/CMakeLists.txt5
-rw-r--r--Tests/Module/ExternalData/Data Space.dat.md51
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake6
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt
index 607e9b9..a379dca 100644
--- a/Tests/Module/ExternalData/CMakeLists.txt
+++ b/Tests/Module/ExternalData/CMakeLists.txt
@@ -14,10 +14,15 @@ set(ExternalData_URL_TEMPLATES
set(ExternalData_BINARY_ROOT "${CMAKE_CURRENT_BINARY_DIR}/ExternalData")
file(REMOVE_RECURSE ${ExternalData_BINARY_ROOT}) # clean test
+if(MAKE_SUPPORTS_SPACES)
+ set(Data1CheckSpaces -D "DataSpace=DATA{Data Space.dat}")
+endif()
+
ExternalData_Add_Test(Data1
NAME Data1Check
COMMAND ${CMAKE_COMMAND}
-D Data=DATA{Data.dat}
+ ${Data1CheckSpaces}
-D SeriesA=DATA{SeriesA.dat,:}
-D SeriesB=DATA{SeriesB.dat,:}
-D SeriesC=DATA{SeriesC.dat,:}
diff --git a/Tests/Module/ExternalData/Data Space.dat.md5 b/Tests/Module/ExternalData/Data Space.dat.md5
new file mode 100644
index 0000000..70e39bd
--- /dev/null
+++ b/Tests/Module/ExternalData/Data Space.dat.md5
@@ -0,0 +1 @@
+8c018830e3efa5caf3c7415028335a57
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake
index b99d7ae..f40b76c 100644
--- a/Tests/Module/ExternalData/Data1Check.cmake
+++ b/Tests/Module/ExternalData/Data1Check.cmake
@@ -2,6 +2,12 @@ file(STRINGS "${Data}" lines LIMIT_INPUT 1024)
if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
message(SEND_ERROR "Input file:\n ${Data}\ndoes not have expected content, but [[${lines}]]")
endif()
+if(DEFINED DataSpace)
+ file(STRINGS "${DataSpace}" lines LIMIT_INPUT 1024)
+ if(NOT "x${lines}" STREQUAL "xInput file already transformed.")
+ message(SEND_ERROR "Input file:\n ${DataSpace}\ndoes not have expected content, but [[${lines}]]")
+ endif()
+endif()
set(SeriesAn1 "1\\.dat")
set(SeriesBn1 "_1\\.dat")
set(SeriesCn1 "\\.1\\.dat")