Browse Source

Tests: Fix CheckSourceTree test for newer Git

The output of 'git status' no longer starts each line in '#'.
Match that optionally.
Brad King 11 years ago
parent
commit
2a3e263173
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Tests/CMakeTests/CheckSourceTreeTest.cmake.in

+ 2 - 2
Tests/CMakeTests/CheckSourceTreeTest.cmake.in

@@ -268,12 +268,12 @@ if(NOT ov STREQUAL "")
 
     if(consider)
       if(is_git_checkout)
-        if(line MATCHES "^#[ \t]*modified:")
+        if(line MATCHES "^#?[ \t]*modified:")
           message("   locally modified file detected...")
           set(modifications 1)
         endif()
 
-        if(line MATCHES "^# Untracked")
+        if(line MATCHES "^(# )?Untracked")
           message("   locally non-added file/directory detected...")
           set(nonadditions 1)
         endif()