From 160c32e529aef4c685f61216b9d46889a8eae290 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 1 Nov 2004 16:57:05 -0500 Subject: [PATCH] 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 --- Source/kwsys/SystemTools.cxx | 2 +- Tests/Dependency/{One => 1}/CMakeLists.txt | 0 Tests/Dependency/{One => 1}/OneSrc.c | 0 Tests/Dependency/CMakeLists.txt | 9 +++++---- 4 files changed, 6 insertions(+), 5 deletions(-) rename Tests/Dependency/{One => 1}/CMakeLists.txt (100%) rename Tests/Dependency/{One => 1}/OneSrc.c (100%) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index d5b5b74cf..39d31a3dc 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/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] != ' ') { diff --git a/Tests/Dependency/One/CMakeLists.txt b/Tests/Dependency/1/CMakeLists.txt similarity index 100% rename from Tests/Dependency/One/CMakeLists.txt rename to Tests/Dependency/1/CMakeLists.txt diff --git a/Tests/Dependency/One/OneSrc.c b/Tests/Dependency/1/OneSrc.c similarity index 100% rename from Tests/Dependency/One/OneSrc.c rename to Tests/Dependency/1/OneSrc.c diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt index 724f109c0..97eab83e9 100644 --- a/Tests/Dependency/CMakeLists.txt +++ b/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 )