summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2007-04-27 01:50:52 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2007-04-27 01:50:52 (GMT)
commit1d4613a63bbdd5eafc8add05bf58e5c61c7ca5e5 (patch)
tree937bd98a875d3961b9be9092e9cac75510e0f7e7 /Tests
parent6697979aaf1e37f6adfe1335b03b38cc2abeeaac (diff)
downloadCMake-1d4613a63bbdd5eafc8add05bf58e5c61c7ca5e5.zip
CMake-1d4613a63bbdd5eafc8add05bf58e5c61c7ca5e5.tar.gz
CMake-1d4613a63bbdd5eafc8add05bf58e5c61c7ca5e5.tar.bz2
ENH: Add STRING STRIP command
Diffstat (limited to 'Tests')
-rw-r--r--Tests/StringFileTest/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index 618f92a..c2bb53f 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -34,6 +34,20 @@ STRING(TOUPPER "CMake" tuvar)
STRING(TOLOWER "CMake" tlvar)
STRING(REPLACE "Autoconf" "CMake" repvar "People should use Autoconf")
+STRING(STRIP "
+ ST1
+ " ST1)
+STRING(STRIP "ST2 " ST2)
+STRING(STRIP " ST3" ST3)
+
+FOREACH(var ST1 ST2 ST3)
+ IF("${var}" STREQUAL "${${var}}")
+ MESSAGE("[${var}] == [${${var}}]")
+ ELSE("${var}" STREQUAL "${${var}}")
+ MESSAGE(SEND_ERROR "Problem with the STRIP command for ${var}: [${${var}}]")
+ ENDIF("${var}" STREQUAL "${${var}}")
+ENDFOREACH(var)
+
STRING(SUBSTRING "People should use Autoconf" 7 10 substringres)
SET(substringres "Everybody ${substringres} CMake")