diff options
author | Matt McCormick <matt.mccormick@kitware.com> | 2014-01-16 00:40:28 (GMT) |
---|---|---|
committer | Matt McCormick <matt.mccormick@kitware.com> | 2014-01-16 00:43:25 (GMT) |
commit | 1cb9ef817334235fa9ebb57060b6df78d1a0b058 (patch) | |
tree | 2b70f06eb0b1d85c63fae962121223485b443db3 /Tests/CMakeTests | |
parent | f73f0fb357eee40f794abc55a0091e77f50cc62d (diff) | |
download | CMake-1cb9ef817334235fa9ebb57060b6df78d1a0b058.zip CMake-1cb9ef817334235fa9ebb57060b6df78d1a0b058.tar.gz CMake-1cb9ef817334235fa9ebb57060b6df78d1a0b058.tar.bz2 |
file DOWNLOAD: Test non-zero return status.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r-- | Tests/CMakeTests/FileDownloadTest.cmake.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in index 91086c6..83ade2b 100644 --- a/Tests/CMakeTests/FileDownloadTest.cmake.in +++ b/Tests/CMakeTests/FileDownloadTest.cmake.in @@ -94,3 +94,16 @@ file(DOWNLOAD EXPECTED_MD5 d16778650db435bda3a8c3435c3ff5d1 ) message(STATUS "${status}") + +message(STATUS "FileDownload:11") +file(DOWNLOAD + badhostname.png + ${dir}/file11.png + TIMEOUT 2 + STATUS status + ) +message(STATUS "${status}") +list(GET status 0 status_code) +if(NOT ${status_code} EQUAL 6) + message(SEND_ERROR "error: expected status code 6 for bad host name, got: ${status_code}") +endif() |