summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-03 22:09:35 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-03 22:09:35 (GMT)
commit9787e55ee85dc53d28161367b26865e0c4d0ea50 (patch)
treef115650b5b87b124d9e870f0dae50ed0873eafdb /Tests/ComplexOneConfig
parent44f96ff1018c12c4a1f2d17dd03b7d9cbf7139b7 (diff)
downloadCMake-9787e55ee85dc53d28161367b26865e0c4d0ea50.zip
CMake-9787e55ee85dc53d28161367b26865e0c4d0ea50.tar.gz
CMake-9787e55ee85dc53d28161367b26865e0c4d0ea50.tar.bz2
ENH: Added test for new EXECUTE_PROCESS command.
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 56784a0..f51708e 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -140,6 +140,29 @@ ENDIF (NOT NO_EXEC_PROGRAM)
MARK_AS_ADVANCED(NO_EXEC_PROGRAM)
MARK_AS_ADVANCED(CLEAR NO_EXEC_PROGRAM)
+# Execute a process. Add coverage for this command.
+EXECUTE_PROCESS(
+ COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
+ OUTPUT_VARIABLE TEST_OUT
+ )
+IF("${TEST_OUT}" MATCHES "ABCDEFG")
+ELSE("${TEST_OUT}" MATCHES "ABCDEFG")
+ MESSAGE(SEND_ERROR "EXECUTE_PROCESS output test failed")
+ENDIF("${TEST_OUT}" MATCHES "ABCDEFG")
+EXECUTE_PROCESS(
+ COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
+ COMMAND /process/does/not/exist
+ OUTPUT_QUIET
+ ERROR_QUIET
+ RESULT_VARIABLE RESULT
+ )
+IF("${RESULT}" MATCHES "^0$")
+ MESSAGE(SEND_ERROR
+ "EXECUTE_PROCESS result test failed with RESULT=[${RESULT}]")
+ELSE("${RESULT}" MATCHES "^0$")
+ MESSAGE(STATUS "EXECUTE_PROCESS result test passed with RESULT=[${RESULT}]")
+ENDIF("${RESULT}" MATCHES "^0$")
+
#
# Create directory.
# The 'complex' executable will then test if this dir exists,