file DOWNLOAD: Add test for bad hash.

This commit is contained in:
Matt McCormick 2014-01-15 19:27:26 -05:00
parent b5e2265fc3
commit f73f0fb357
2 changed files with 14 additions and 0 deletions

View File

@ -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 "")

View File

@ -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
)