summaryrefslogtreecommitdiffstats
path: root/Tests/Module/ExternalData/Data1Check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-05 19:46:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-02-05 19:46:40 (GMT)
commit020525845a3999078e4f7897d293c5aeab20af87 (patch)
tree1ae898bd1fed8aebe9a7cd01ffc159e0c09fbe4d /Tests/Module/ExternalData/Data1Check.cmake
parent252c5211b57e48da87b94a49503f515ef5edbe6f (diff)
parent5484c6069409331a8054190d9bae874d5b3c3bff (diff)
downloadCMake-020525845a3999078e4f7897d293c5aeab20af87.zip
CMake-020525845a3999078e4f7897d293c5aeab20af87.tar.gz
CMake-020525845a3999078e4f7897d293c5aeab20af87.tar.bz2
Merge topic 'add-ExternalData-module'
5484c60 Merge branch 'vs6-rule-files' into add-ExternalData-module 1fd8d01 ExternalData: Attach download rules to content links in IDEs a6d3ffc Fix Module.ExternalData test on VS 6 aed590a Fix Module.ExternalData test on Cygwin 06e8ded Merge branch 'fix-atomic-rename-on-Windows' into add-ExternalData-module e2e0d2e ExternalData: Collapse ../ components in DATA{} paths ee2abfd ExternalData: Add support for SHA 1 and 2 hash algorithms aa8b228 ExternalData: Generalize hash algo/ext handling 9e518a8 ExternalData: Allow DATA{} syntax to reference directories 175ed02 ExternalData: Allow ()-groups in series match regex 4befecc ExternalData: Add tests covering interfaces and errors bcd2580 ExternalData: Improve series matching using an explicit syntax c0cebcb ExternalData: Remove unused private interface 5275993 ExternalData: Cleanup stray TODO and typo in comments 7bb8344 ExternalData: Do not match directory names when resolving DATA{} 00d801f ExternalData: Remove compatibility with CMake < 2.8.5 ...
Diffstat (limited to 'Tests/Module/ExternalData/Data1Check.cmake')
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake52
1 files changed, 52 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake
new file mode 100644
index 0000000..b99d7ae
--- /dev/null
+++ b/Tests/Module/ExternalData/Data1Check.cmake
@@ -0,0 +1,52 @@
+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()
+set(SeriesAn1 "1\\.dat")
+set(SeriesBn1 "_1\\.dat")
+set(SeriesCn1 "\\.1\\.dat")
+set(SeriesDn1 "-1\\.dat")
+set(SeriesAl 1 2 3)
+set(SeriesBl _1 _2 _3)
+set(SeriesCl .1 .2 .3)
+set(SeriesDl -1 -2 -3)
+foreach(s A B C D)
+ foreach(n "" ${Series${s}l})
+ string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+ endforeach()
+endforeach()
+foreach(s A B C D)
+ foreach(n ${Series${s}l})
+ string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+ endforeach()
+endforeach()
+foreach(n .1 .2 .3 .4)
+ string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n A B)
+ string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n Top A B C)
+ string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
+foreach(n A B C)
+ set(file "${Directory}/${n}.dat")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()