summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-16 16:26:10 (GMT)
committerBrad King <brad.king@kitware.com>2011-11-16 16:26:10 (GMT)
commit8302608a744c3a4df3495f8db88784fb3f04660f (patch)
treea0cd96726251b7e4f00ffebde68633f9c21ba20d /Tests/CMakeTests
parent9fb1a9cf1dc45672b38350f2c4ae560359521566 (diff)
downloadCMake-8302608a744c3a4df3495f8db88784fb3f04660f.zip
CMake-8302608a744c3a4df3495f8db88784fb3f04660f.tar.gz
CMake-8302608a744c3a4df3495f8db88784fb3f04660f.tar.bz2
Fix CMake.File hash test for CRLF checkouts
Use a dedicated test input file for the file() hash API tests. Set attribute crlf=input so it is always checked out correctly.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/.gitattributes1
-rw-r--r--Tests/CMakeTests/File-HASH-Input.txt1
-rw-r--r--Tests/CMakeTests/File-MD5-BadArg2.cmake2
-rw-r--r--Tests/CMakeTests/File-MD5-BadArg4.cmake2
-rw-r--r--Tests/CMakeTests/File-MD5-Works.cmake2
-rw-r--r--Tests/CMakeTests/File-SHA1-Works.cmake2
-rw-r--r--Tests/CMakeTests/File-SHA224-Works.cmake2
-rw-r--r--Tests/CMakeTests/File-SHA256-Works.cmake2
-rw-r--r--Tests/CMakeTests/File-SHA384-Works.cmake2
-rw-r--r--Tests/CMakeTests/File-SHA512-Works.cmake2
-rw-r--r--Tests/CMakeTests/FileTest.cmake.in12
11 files changed, 16 insertions, 14 deletions
diff --git a/Tests/CMakeTests/.gitattributes b/Tests/CMakeTests/.gitattributes
new file mode 100644
index 0000000..c34e350
--- /dev/null
+++ b/Tests/CMakeTests/.gitattributes
@@ -0,0 +1 @@
+File-HASH-Input.txt crlf=input
diff --git a/Tests/CMakeTests/File-HASH-Input.txt b/Tests/CMakeTests/File-HASH-Input.txt
new file mode 100644
index 0000000..a1d315b
--- /dev/null
+++ b/Tests/CMakeTests/File-HASH-Input.txt
@@ -0,0 +1 @@
+sample input string
diff --git a/Tests/CMakeTests/File-MD5-BadArg2.cmake b/Tests/CMakeTests/File-MD5-BadArg2.cmake
index 68a172f..2acc075 100644
--- a/Tests/CMakeTests/File-MD5-BadArg2.cmake
+++ b/Tests/CMakeTests/File-MD5-BadArg2.cmake
@@ -1 +1 @@
-file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake)
+file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt)
diff --git a/Tests/CMakeTests/File-MD5-BadArg4.cmake b/Tests/CMakeTests/File-MD5-BadArg4.cmake
index a11efcb..79b2755 100644
--- a/Tests/CMakeTests/File-MD5-BadArg4.cmake
+++ b/Tests/CMakeTests/File-MD5-BadArg4.cmake
@@ -1 +1 @@
-file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake md5 extra_arg)
+file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt md5 extra_arg)
diff --git a/Tests/CMakeTests/File-MD5-Works.cmake b/Tests/CMakeTests/File-MD5-Works.cmake
index 2989e98..0fabe54 100644
--- a/Tests/CMakeTests/File-MD5-Works.cmake
+++ b/Tests/CMakeTests/File-MD5-Works.cmake
@@ -1,2 +1,2 @@
-file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake md5)
+file(MD5 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt md5)
message("${md5}")
diff --git a/Tests/CMakeTests/File-SHA1-Works.cmake b/Tests/CMakeTests/File-SHA1-Works.cmake
index 03ea3ac..f2ab5d7 100644
--- a/Tests/CMakeTests/File-SHA1-Works.cmake
+++ b/Tests/CMakeTests/File-SHA1-Works.cmake
@@ -1,2 +1,2 @@
-file(SHA1 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha1)
+file(SHA1 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt sha1)
message("${sha1}")
diff --git a/Tests/CMakeTests/File-SHA224-Works.cmake b/Tests/CMakeTests/File-SHA224-Works.cmake
index 0295346..3e86b17 100644
--- a/Tests/CMakeTests/File-SHA224-Works.cmake
+++ b/Tests/CMakeTests/File-SHA224-Works.cmake
@@ -1,2 +1,2 @@
-file(SHA224 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha224)
+file(SHA224 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt sha224)
message("${sha224}")
diff --git a/Tests/CMakeTests/File-SHA256-Works.cmake b/Tests/CMakeTests/File-SHA256-Works.cmake
index 32bc9fe..b72d89e 100644
--- a/Tests/CMakeTests/File-SHA256-Works.cmake
+++ b/Tests/CMakeTests/File-SHA256-Works.cmake
@@ -1,2 +1,2 @@
-file(SHA256 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha256)
+file(SHA256 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt sha256)
message("${sha256}")
diff --git a/Tests/CMakeTests/File-SHA384-Works.cmake b/Tests/CMakeTests/File-SHA384-Works.cmake
index 5c56de2..0eeca33 100644
--- a/Tests/CMakeTests/File-SHA384-Works.cmake
+++ b/Tests/CMakeTests/File-SHA384-Works.cmake
@@ -1,2 +1,2 @@
-file(SHA384 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha384)
+file(SHA384 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt sha384)
message("${sha384}")
diff --git a/Tests/CMakeTests/File-SHA512-Works.cmake b/Tests/CMakeTests/File-SHA512-Works.cmake
index cf10706..d74ee44 100644
--- a/Tests/CMakeTests/File-SHA512-Works.cmake
+++ b/Tests/CMakeTests/File-SHA512-Works.cmake
@@ -1,2 +1,2 @@
-file(SHA512 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha512)
+file(SHA512 ${CMAKE_CURRENT_LIST_DIR}/File-HASH-Input.txt sha512)
message("${sha512}")
diff --git a/Tests/CMakeTests/FileTest.cmake.in b/Tests/CMakeTests/FileTest.cmake.in
index 824aba7..3c3d85d 100644
--- a/Tests/CMakeTests/FileTest.cmake.in
+++ b/Tests/CMakeTests/FileTest.cmake.in
@@ -21,17 +21,17 @@ set(MD5-BadArg2-STDERR "file MD5 requires a file name and output variable")
set(MD5-BadArg4-RESULT 1)
set(MD5-BadArg4-STDERR "file MD5 requires a file name and output variable")
set(MD5-Works-RESULT 0)
-set(MD5-Works-STDERR "a28a44fb5b58a6acf0cbec46557bc775")
+set(MD5-Works-STDERR "10d20ddb981a6202b84aa1ce1cb7fce3")
set(SHA1-Works-RESULT 0)
-set(SHA1-Works-STDERR "e0ce452a7e34e9c705b46e4e7c9cd959082c0777")
+set(SHA1-Works-STDERR "83f093e04289b21a9415f408ad50be8b57ad2f34")
set(SHA224-Works-RESULT 0)
-set(SHA224-Works-STDERR "d1f1c9db3df73586a5a200014505ef03b70da5e0539eb35c11b4ef6f")
+set(SHA224-Works-STDERR "e995a7789922c4ef9279d94e763c8375934180a51baa7147bc48edf7")
set(SHA256-Works-RESULT 0)
-set(SHA256-Works-STDERR "bb38de1c34713f750a4f84404ef5fb1efb93cf815cb09182db457ba91de19195")
+set(SHA256-Works-STDERR "d1c5915d8b71150726a1eef75a29ec6bea8fd1bef6b7299ef8048760b0402025")
set(SHA384-Works-RESULT 0)
-set(SHA384-Works-STDERR "2f01d58436bd04a40ec2c938a15f2bb661bf1bf1560a5f2d40a3ebbb716a58e400ab2992c23ba19fa96dc519e0042c26")
+set(SHA384-Works-STDERR "1de9560b4e030e02051ea408200ffc55d70c97ac64ebf822461a5c786f495c36df43259b14483bc8d364f0106f4971ee")
set(SHA512-Works-RESULT 0)
-set(SHA512-Works-STDERR "349d02e347ddb133afb4557c9e541163f54b6eaa9eb345672bfd7bbce90c9872bf1fad9c6662248eb7b092aef719e4b8c3b8bb1cf47f287abbde12360c073686")
+set(SHA512-Works-STDERR "3982a1b4e651768bec70ab1fb97045cb7a659f4ba7203d501c52ab2e803071f9d5fd272022df15f27727fc67f8cd022e710e29010b2a9c0b467c111e2f6abf51")
include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
check_cmake_test(File