Просмотр исходного кода

BUG: add a test for a single char dir, and fix bug introduced in 1.53, but we still can not handle a space as the start of a directory name

Bill Hoffman 21 лет назад
Родитель
Сommit
160c32e529

+ 1 - 1
Source/kwsys/SystemTools.cxx

@@ -744,7 +744,7 @@ void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path)
   while((pos = path.find('\\', pos)) != kwsys_stl::string::npos)
     {
     // make sure we don't convert an escaped space to a unix slash
-    if(pos < path.size()-2)
+    if(pos < path.size()-1)
       {
       if(path[pos+1] != ' ')
         {

+ 0 - 0
Tests/Dependency/One/CMakeLists.txt → Tests/Dependency/1/CMakeLists.txt


+ 0 - 0
Tests/Dependency/One/OneSrc.c → Tests/Dependency/1/OneSrc.c


+ 5 - 4
Tests/Dependency/CMakeLists.txt

@@ -1,15 +1,16 @@
 PROJECT( Dependency )
 
+# to test directories with only one character One was changed to 1
 # There is one executable that depends on eight libraries. The
 # system has the following dependency graph:
 #
 # NoDepA:
 # NoDepB: NoDepA
 # NoDepC: NoDepA
-# One:
+# 1:
 # Two: Three
-# Three: One Four
-# Four: One Two NoDepA
+# Three: 1 Four
+# Four: 1 Two NoDepA
 # Five: Two
 # SixA: Two Five
 # SixB: Four Five
@@ -28,5 +29,5 @@ PROJECT( Dependency )
 # in the corresponding CMakeLists.txt just because of commands used.
 
 SUBDIRS( NoDepA NoDepB NoDepC )
-SUBDIRS( One Two Three Four Five Six Seven Eight )
+SUBDIRS( 1 Two Three Four Five Six Seven Eight )
 SUBDIRS( Exec Exec2 Exec3 Exec4 )