diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeTests/FileDownloadBadHashTest.cmake.in | 5 | ||||
-rw-r--r-- | Tests/CMakeTests/FileDownloadTest.cmake.in | 5 | ||||
-rw-r--r-- | Tests/CMakeTests/FileUploadTest.cmake.in | 5 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/file/UPLOAD-unused-argument.cmake | 5 |
6 files changed, 24 insertions, 6 deletions
diff --git a/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in index 4a47c06..64b45ed 100644 --- a/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in +++ b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in @@ -1,4 +1,7 @@ -set(url "file://@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png") +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 diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in index 83ade2b..f6d9ad9 100644 --- a/Tests/CMakeTests/FileDownloadTest.cmake.in +++ b/Tests/CMakeTests/FileDownloadTest.cmake.in @@ -1,4 +1,7 @@ -set(url "file://@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png") +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") message(STATUS "FileDownload:1") diff --git a/Tests/CMakeTests/FileUploadTest.cmake.in b/Tests/CMakeTests/FileUploadTest.cmake.in index 8577aef..9e22909 100644 --- a/Tests/CMakeTests/FileUploadTest.cmake.in +++ b/Tests/CMakeTests/FileUploadTest.cmake.in @@ -10,7 +10,10 @@ endif() file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/uploads") set(filename "@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png") -set(urlbase "file://@CMAKE_CURRENT_BINARY_DIR@/uploads") +if(NOT "@CMAKE_CURRENT_BINARY_DIR@" MATCHES "^/") + set(slash /) +endif() +set(urlbase "file://${slash}@CMAKE_CURRENT_BINARY_DIR@/uploads") message(STATUS "FileUpload:1") file(UPLOAD diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake index ca72692..a91b217 100644 --- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake +++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake @@ -1,5 +1,8 @@ +if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/") + set(slash /) +endif() file(DOWNLOAD - "file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt" + "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt" ${CMAKE_CURRENT_BINARY_DIR}/hash-mismatch.txt EXPECTED_HASH SHA1=0123456789abcdef0123456789abcdef01234567 STATUS status diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake index 2e3fbe1..2fa5482 100644 --- a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake +++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake @@ -1,5 +1,8 @@ +if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/") + set(slash /) +endif() file(DOWNLOAD - "file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt" + "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt" "${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt" JUNK ) diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake index 94ac9ac..92c878c 100644 --- a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake +++ b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake @@ -1,5 +1,8 @@ +if(NOT "${CMAKE_CURRENT_BINARY_DIR}" MATCHES "^/") + set(slash /) +endif() file(UPLOAD "${CMAKE_CURRENT_SOURCE_DIR}/UPLOAD-unused-argument.txt" - "file://${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt" + "file://${slash}${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt" JUNK ) |