summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-10 14:23:33 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-10 14:23:33 (GMT)
commit211e3223a6f96800b5c7187a58715a8e1e081869 (patch)
treed59b47eff6038561090629ec3b62b030b5bced77 /Tests
parente8cdbec45e757352580476a329f4998074d1b10a (diff)
parent7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 (diff)
downloadCMake-211e3223a6f96800b5c7187a58715a8e1e081869.zip
CMake-211e3223a6f96800b5c7187a58715a8e1e081869.tar.gz
CMake-211e3223a6f96800b5c7187a58715a8e1e081869.tar.bz2
Merge topic 'test-cpack-improve-failure-messages'
7f90d5e5 Tests: Improve RunCMake.CPack_* failure message formatting
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CPack/VerifyResult.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake
index 8bc2a58..ad2a651 100644
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@ -27,10 +27,12 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
expected_content_list "${PACKAGE_CONTENT}")
if(NOT expected_content_list)
+ string(REPLACE "\n" "\n actual> " msg_actual "\n${PACKAGE_CONTENT}")
+ string(REPLACE "\n" "\n expect> " msg_expected "\n${EXPECTED_FILE_CONTENT_${file_no_}}")
message(FATAL_ERROR
"Unexpected file content for file No. '${file_no_}'!\n"
- " Content: '${PACKAGE_CONTENT}'\n\n"
- " Expected: '${EXPECTED_FILE_CONTENT_${file_no_}}'"
+ "The content was:${msg_actual}\n"
+ "which does not match:${msg_expected}\n"
"${output_error_message}")
endif()
else()