浏览代码

BUG: Fix CTest.UpdateCVS/SVN tests for win slashes

This fixes the tests to allow windows slashes in reported file names in
the generated Update.xml file.
Brad King 16 年之前
父节点
当前提交
ac89c8004b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Tests/CTestUpdateCommon.cmake

+ 3 - 1
Tests/CTestUpdateCommon.cmake

@@ -37,7 +37,9 @@ function(check_updates build)
   # Verify that expected entries exist
   set(MISSING)
   foreach(f ${ARGN})
-    if(NOT "${UPDATE_XML_ENTRIES}" MATCHES "<FullName>${f}</FullName>")
+    string(REPLACE "/" "[/\\\\]" regex "${f}")
+    string(REPLACE "." "\\." regex "${regex}")
+    if(NOT "${UPDATE_XML_ENTRIES}" MATCHES "<FullName>${regex}</FullName>")
       list(APPEND MISSING ${f})
     endif()
   endforeach(f)