summaryrefslogtreecommitdiffstats
path: root/test/run.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-12 20:43:15 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-12 21:18:10 (GMT)
commitfe33c51babb2221aeaeefd0a86dbf1405ee5f170 (patch)
treef3a17ae9339e65b2ed9d92cbf466ed9e023a7f6c /test/run.cmake
parent75c7f16755e9ad6dbd50b32d7cee8aa1dcaa1ab7 (diff)
downloadCastXML-fe33c51babb2221aeaeefd0a86dbf1405ee5f170.zip
CastXML-fe33c51babb2221aeaeefd0a86dbf1405ee5f170.tar.gz
CastXML-fe33c51babb2221aeaeefd0a86dbf1405ee5f170.tar.bz2
test: Fix test output conversion for CastXML-format results
When using `TEST_UPDATE` to convert the actual test output to the expected test output we must convert the `CastXML` element as we already do for `GCC_XML`.
Diffstat (limited to 'test/run.cmake')
-rw-r--r--test/run.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/run.cmake b/test/run.cmake
index 2b2c14e..635c27b 100644
--- a/test/run.cmake
+++ b/test/run.cmake
@@ -91,6 +91,7 @@ if(msg)
set(update_xml "${actual_xml}")
string(REGEX REPLACE "^<\\?xml version=\"1.0\"\\?>" "^<\\\\?xml version=\"1.0\"\\\\?>" update_xml "${update_xml}")
string(REGEX REPLACE "([(*)])" "\\\\\\1" update_xml "${update_xml}")
+ string(REGEX REPLACE "<CastXML[^>]*>" "<CastXML[^>]*>" update_xml "${update_xml}")
string(REGEX REPLACE "<GCC_XML[^>]*>" "<GCC_XML[^>]*>" update_xml "${update_xml}")
string(REGEX REPLACE "mangled=\"[^\"]*\"" "mangled=\"[^\"]+\"" update_xml "${update_xml}")
string(REGEX REPLACE "artificial=\"1\"( throw=\"\")?" "artificial=\"1\"( throw=\"\")?" update_xml "${update_xml}")
@@ -100,6 +101,7 @@ if(msg)
string(REGEX REPLACE "<Base type=\"([^\"]*)\" access=\"([^\"]*)\" virtual=\"0\" offset=\"[0-9]+\"/>" "<Base type=\"\\1\" access=\"\\2\" virtual=\"0\" offset=\"[0-9]+\"/>" update_xml "${update_xml}")
endif()
string(REGEX REPLACE "</GCC_XML>$" "</GCC_XML>$" update_xml "${update_xml}")
+ string(REGEX REPLACE "</CastXML>$" "</CastXML>$" update_xml "${update_xml}")
file(WRITE "${expect_xml_file}" "${update_xml}\n")
endif()