summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/StringTestScript.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-11-06 15:07:10 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-11-06 15:07:10 (GMT)
commitd6fe0438c1d5c6ecd5ebc0377781175ce14ac251 (patch)
tree7ac99f9ad88911211a8c003f2f19d2b4754f1543 /Tests/CMakeTests/StringTestScript.cmake
parent10762565e95b9cac08b7a0b643fdc5bf39bb2b96 (diff)
downloadCMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.zip
CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.gz
CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.bz2
Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument.
Diffstat (limited to 'Tests/CMakeTests/StringTestScript.cmake')
-rw-r--r--Tests/CMakeTests/StringTestScript.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeTests/StringTestScript.cmake b/Tests/CMakeTests/StringTestScript.cmake
index 652d81b..3703856 100644
--- a/Tests/CMakeTests/StringTestScript.cmake
+++ b/Tests/CMakeTests/StringTestScript.cmake
@@ -182,6 +182,14 @@ elseif(testname STREQUAL random_with_various_alphabets) # pass
string(RANDOM LENGTH 1 ALPHABET "Q" v)
message(STATUS "v='${v}'")
+ # seed values -- 2 same, then 1 different
+ string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 987654 v)
+ message(STATUS "v='${v}'")
+ string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 987654 v)
+ message(STATUS "v='${v}'")
+ string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 876543 v)
+ message(STATUS "v='${v}'")
+
# alphabet of many colors - use all the crazy keyboard characters
string(RANDOM LENGTH 78 ALPHABET "~`!@#$%^&*()_-+={}[]\\|:\\;'\",.<>/?" v)
message(STATUS "v='${v}'")