CMake/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
Brad King 14c771530a Tests: Fix file:// URLs given to curl
Since upstream curl commit curl-7_52_0~131 (URL-parser: for
file://[host]/ URLs, the [host] must be localhost, 2016-11-11) we can no
longer use URLs of the form `file://c:/...` on Windows.  These worked
only accidentally before.  Use `file:///c:/...` instead.
2017-02-10 13:10:07 -05:00

14 lines
333 B
CMake

if(NOT "@CMAKE_CURRENT_SOURCE_DIR@" MATCHES "^/")
set(slash /)
endif()
set(url "file://${slash}@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
)