From 8d373310561a8d68d2a22ca7c6613deff5fa6e05 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 2 Feb 2010 22:33:34 +0000 Subject: Adds support for alternate path separator on Windows, and make all tests pass with CMake and VC++ 9 (by Manuel Klimek). --- include/gtest/internal/gtest-filepath.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/gtest/internal/gtest-filepath.h') diff --git a/include/gtest/internal/gtest-filepath.h b/include/gtest/internal/gtest-filepath.h index 1b2f5869..394f26ae 100644 --- a/include/gtest/internal/gtest-filepath.h +++ b/include/gtest/internal/gtest-filepath.h @@ -189,9 +189,18 @@ class FilePath { // particular, RemoveTrailingPathSeparator() only removes one separator, and // it is called in CreateDirectoriesRecursively() assuming that it will change // a pathname from directory syntax (trailing separator) to filename syntax. + // + // On Windows this method also replaces the alternate path separator '/' with + // the primary path separator '\\', so that for example "bar\\/\\foo" becomes + // "bar\\foo". void Normalize(); + // Returns a pointer to the last occurence of a valid path separator in + // the FilePath. On Windows, for example, both '/' and '\' are valid path + // separators. Returns NULL if no path separator was found. + const char* FindLastPathSeparator() const; + String pathname_; }; // class FilePath -- cgit v1.2.3