Browse Source

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 năm trước cách đây
mục cha
commit
ac89c8004b
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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)