ENH: Strengthened EXECUTE_PROCESS output check test.

This commit is contained in:
Brad King 2006-02-10 11:47:18 -05:00
parent 4646929df4
commit 1b6e55933b
3 changed files with 12 additions and 12 deletions

View File

@ -145,10 +145,10 @@ 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")
IF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
ELSE("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
MESSAGE(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
ENDIF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
COMMAND /process/does/not/exist

View File

@ -145,10 +145,10 @@ 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")
IF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
ELSE("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
MESSAGE(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
ENDIF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
COMMAND /process/does/not/exist

View File

@ -145,10 +145,10 @@ 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")
IF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
ELSE("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
MESSAGE(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
ENDIF("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
COMMAND /process/does/not/exist