diff options
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt | 12 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt | 0 | ||||
-rw-r--r-- | Tests/RunCMake/file/RunCMakeTest.cmake | 1 |
5 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt new file mode 100644 index 0000000..406e315 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at DOWNLOAD-hash-mismatch.cmake:[0-9]+ \(file\): + file DOWNLOAD HASH mismatch + + for file: \[.*/Tests/RunCMake/file/DOWNLOAD-hash-mismatch-build/hash-mismatch.txt\] + expected hash: \[0123456789abcdef0123456789abcdef01234567\] + actual hash: \[da39a3ee5e6b4b0d3255bfef95601890afd80709\] + status: \[0;"No error"\] + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +status='1;HASH mismatch: expected: 0123456789abcdef0123456789abcdef01234567 actual: da39a3ee5e6b4b0d3255bfef95601890afd80709'$ diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake new file mode 100644 index 0000000..ca72692 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake @@ -0,0 +1,7 @@ +file(DOWNLOAD + "file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt" + ${CMAKE_CURRENT_BINARY_DIR}/hash-mismatch.txt + EXPECTED_HASH SHA1=0123456789abcdef0123456789abcdef01234567 + STATUS status + ) +message("status='${status}'") diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.txt diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index d3dfb1b..5f85bba 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(DOWNLOAD-hash-mismatch) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) |