summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.cc1
-rw-r--r--src/util_test.cc8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc
index 0e4dc59..24d231f 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -194,7 +194,6 @@ static inline bool IsKnownShellSafeCharacter(char ch) {
static inline bool IsKnownWin32SafeCharacter(char ch) {
switch (ch) {
- case '\\':
case ' ':
case '"':
return false;
diff --git a/src/util_test.cc b/src/util_test.cc
index f6728fb..f827e5a 100644
--- a/src/util_test.cc
+++ b/src/util_test.cc
@@ -159,6 +159,14 @@ TEST(PathEscaping, SensiblePathsAreNotNeedlesslyEscaped) {
EXPECT_EQ(path, result);
}
+TEST(PathEscaping, SensibleWin32PathsAreNotNeedlesslyEscaped) {
+ const char* path = "some\\sensible\\path\\without\\crazy\\characters.cc";
+ string result;
+
+ GetWin32EscapedString(path, &result);
+ EXPECT_EQ(path, result);
+}
+
TEST(StripAnsiEscapeCodes, EscapeAtEnd) {
string stripped = StripAnsiEscapeCodes("foo\33");
EXPECT_EQ("foo", stripped);