summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2014-01-16 00:27:26 (GMT)
committerMatt McCormick <matt.mccormick@kitware.com>2014-01-16 00:43:23 (GMT)
commitf73f0fb357eee40f794abc55a0091e77f50cc62d (patch)
treefd228147eb587558de3dc87c0de2e2bcded66996 /Tests/CMakeTests
parentb5e2265fc3a1e8505c6a230b79a2bbb768e5efc5 (diff)
downloadCMake-f73f0fb357eee40f794abc55a0091e77f50cc62d.zip
CMake-f73f0fb357eee40f794abc55a0091e77f50cc62d.tar.gz
CMake-f73f0fb357eee40f794abc55a0091e77f50cc62d.tar.bz2
file DOWNLOAD: Add test for bad hash.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/CMakeLists.txt4
-rw-r--r--Tests/CMakeTests/FileDownloadBadHashTest.cmake.in10
2 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index 41714f6..ce36830 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -38,6 +38,10 @@ AddCMakeTest(FileDownload "")
set_property(TEST CMake.FileDownload PROPERTY
PASS_REGULAR_EXPRESSION "file already exists with expected MD5 sum"
)
+AddCMakeTest(FileDownloadBadHash "")
+set_property(TEST CMake.FileDownloadBadHash PROPERTY
+ WILL_FAIL TRUE
+ )
AddCMakeTest(FileUpload "")
diff --git a/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
new file mode 100644
index 0000000..4a47c06
--- /dev/null
+++ b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
@@ -0,0 +1,10 @@
+set(url "file://@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
+set(dir "@CMAKE_CURRENT_BINARY_DIR@/downloads")
+
+file(DOWNLOAD
+ ${url}
+ ${dir}/file3.png
+ TIMEOUT 2
+ STATUS status
+ EXPECTED_HASH SHA1=5555555555555555555555555555555555555555
+ )