summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexRelativePaths/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ComplexRelativePaths/CMakeLists.txt')
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index 56784a0..f51708e 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/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,