summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/string/Uuid.cmake
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-08-25 20:44:06 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-08-28 13:13:54 (GMT)
commit328e8694335ca76fb29ebd5fafe4456a89ac25c7 (patch)
treeebd88c211455ff0a7a1ce8081b1c48bcd01fc214 /Tests/RunCMake/string/Uuid.cmake
parentc2a47a9ac3fef38d9da6260725708c2246c1b9c1 (diff)
downloadCMake-328e8694335ca76fb29ebd5fafe4456a89ac25c7.zip
CMake-328e8694335ca76fb29ebd5fafe4456a89ac25c7.tar.gz
CMake-328e8694335ca76fb29ebd5fafe4456a89ac25c7.tar.bz2
StringUuid: Implement new string(UUID) sub-command.
Diffstat (limited to 'Tests/RunCMake/string/Uuid.cmake')
-rw-r--r--Tests/RunCMake/string/Uuid.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/string/Uuid.cmake b/Tests/RunCMake/string/Uuid.cmake
new file mode 100644
index 0000000..2613d26
--- /dev/null
+++ b/Tests/RunCMake/string/Uuid.cmake
@@ -0,0 +1,17 @@
+set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8)
+
+string(UUID WWW_EXAMPLE_COM_MD5_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5)
+
+if(NOT WWW_EXAMPLE_COM_MD5_UUID STREQUAL "5df41881-3aed-3515-88a7-2f4a814cf09e")
+ message(SEND_ERROR
+ "UUID did not create the expected MD5 result: ${WWW_EXAMPLE_COM_MD5_UUID}")
+endif()
+
+string(UUID WWW_EXAMPLE_COM_SHA1_UUID
+ NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE SHA1 UPPER)
+
+if(NOT WWW_EXAMPLE_COM_SHA1_UUID STREQUAL "2ED6657D-E927-568B-95E1-2665A8AEA6A2")
+ message(SEND_ERROR
+ "UUID did not create the expected SHA1 result: ${WWW_EXAMPLE_COM_SHA1_UUID}")
+endif()