mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 00:57:25 +00:00
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.
This commit is contained in:
parent
d45eb35350
commit
55f0148d7b
@ -347,6 +347,7 @@ if(BUILD_TESTING)
|
||||
--build-project ExternalDataTest
|
||||
--build-noclean
|
||||
--force-new-ctest-process
|
||||
--build-options -DMAKE_SUPPORTS_SPACES=${MAKE_SUPPORTS_SPACES}
|
||||
--test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V
|
||||
)
|
||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData")
|
||||
|
@ -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,:}
|
||||
|
1
Tests/Module/ExternalData/Data Space.dat.md5
Normal file
1
Tests/Module/ExternalData/Data Space.dat.md5
Normal file
@ -0,0 +1 @@
|
||||
8c018830e3efa5caf3c7415028335a57
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user