summaryrefslogtreecommitdiffstats
path: root/Tests/CommandLineTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-10 20:45:27 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-10 20:45:27 (GMT)
commitde8080c76f67499bbec259a7683ae66838fd97f0 (patch)
treea2a98428077aefc34cc77b48cbaaa321a1d0a162 /Tests/CommandLineTest
parent85a69c1b9c1884743f08c7bfde0d7bfe44da8ef0 (diff)
downloadCMake-de8080c76f67499bbec259a7683ae66838fd97f0.zip
CMake-de8080c76f67499bbec259a7683ae66838fd97f0.tar.gz
CMake-de8080c76f67499bbec259a7683ae66838fd97f0.tar.bz2
ENH: Added test for IF(DEFINED ENV{var})(.
Diffstat (limited to 'Tests/CommandLineTest')
-rw-r--r--Tests/CommandLineTest/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CommandLineTest/CMakeLists.txt b/Tests/CommandLineTest/CMakeLists.txt
index d24ea94..08fe8d3 100644
--- a/Tests/CommandLineTest/CMakeLists.txt
+++ b/Tests/CommandLineTest/CMakeLists.txt
@@ -73,9 +73,16 @@ ELSE(THIS_SHOULD_BE_SET)
MESSAGE(FATAL_ERROR "PreLoad.cmake does not work.")
ENDIF(THIS_SHOULD_BE_SET)
+IF(DEFINED ENV{TEST_ENVIRONMENT_VARIABLE_NOTSET})
+ MESSAGE(SEND_ERROR "Environment variable definition test broken!")
+ENDIF(DEFINED ENV{TEST_ENVIRONMENT_VARIABLE_NOTSET})
+
SET(ENV{TEST_ENVIRONMENT_VARIABLE} "Environment variable set")
IF("$ENV{TEST_ENVIRONMENT_VARIABLE}" STREQUAL "Environment variable set")
MESSAGE(STATUS "Environment variable set to: $ENV{TEST_ENVIRONMENT_VARIABLE}")
+ IF(NOT DEFINED ENV{TEST_ENVIRONMENT_VARIABLE})
+ MESSAGE(SEND_ERROR "Environment variable definition test failed!")
+ ENDIF(NOT DEFINED ENV{TEST_ENVIRONMENT_VARIABLE})
ELSE("$ENV{TEST_ENVIRONMENT_VARIABLE}" STREQUAL "Environment variable set")
MESSAGE(SEND_ERROR "Environment variable setting is broken")
ENDIF("$ENV{TEST_ENVIRONMENT_VARIABLE}" STREQUAL "Environment variable set")