summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorm.klimenko <mklimenko29@gmail.com>2022-02-15 18:44:53 (GMT)
committerm.klimenko <mklimenko29@gmail.com>2022-02-15 19:08:06 (GMT)
commit231872ddb0bb86a039e78e0b2f10d354a71938b2 (patch)
tree304afa5ef2f7721facbe92235d625e21017b0490 /Tests/CMakeTests
parentf76809c892743de8a59dbcbdd88adb393c045169 (diff)
downloadCMake-231872ddb0bb86a039e78e0b2f10d354a71938b2.zip
CMake-231872ddb0bb86a039e78e0b2f10d354a71938b2.tar.gz
CMake-231872ddb0bb86a039e78e0b2f10d354a71938b2.tar.bz2
file(DOWNLOAD): Add options to download a range
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/FileDownloadTest.cmake.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in
index e0ce99a..255909d 100644
--- a/Tests/CMakeTests/FileDownloadTest.cmake.in
+++ b/Tests/CMakeTests/FileDownloadTest.cmake.in
@@ -179,3 +179,51 @@ if(EXISTS TIMEOUT)
message(SEND_ERROR "TIMEOUT argument was incorrectly interpreted as a filename")
endif()
message(STATUS "${status}")
+
+message(STATUS "FileDownload:14")
+file(DOWNLOAD
+ ${url}
+ ${dir}/file14.bin
+ TIMEOUT ${timeout}
+ STATUS status
+ RANGE_START 0
+ EXPECTED_MD5 dbd330d52f4dbd60115d4191904ded92
+ )
+__reportIfWrongStatus("${status}" 0)
+
+message(STATUS "FileDownload:15")
+file(DOWNLOAD
+ ${url}
+ ${dir}/file15.bin
+ TIMEOUT ${timeout}
+ STATUS status
+ RANGE_END 50
+ EXPECTED_MD5 8592e5665b839b5d23825dc84c135b61
+ )
+__reportIfWrongStatus("${status}" 0)
+
+message(STATUS "FileDownload:16")
+file(DOWNLOAD
+ ${url}
+ ${dir}/file16.bin
+ TIMEOUT ${timeout}
+ STATUS status
+ RANGE_START 10
+ RANGE_END 50
+ EXPECTED_MD5 36cd52681e6c6c8fef85fcd9e86fc30d
+ )
+__reportIfWrongStatus("${status}" 0)
+
+message(STATUS "FileDownload:17")
+file(DOWNLOAD
+ ${url}
+ ${dir}/file17.bin
+ TIMEOUT ${timeout}
+ STATUS status
+ RANGE_START 0
+ RANGE_END 50
+ RANGE_START 60
+ RANGE_END 100
+ EXPECTED_MD5 c5c9e74e82d493dd901eecccd659cebc
+ )
+__reportIfWrongStatus("${status}" 0)