Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: tools/gn/path_output_unittest.cc

Issue 1214933007: Normalize paths in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually "git add" the test file. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/source_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/path_output_unittest.cc
diff --git a/tools/gn/path_output_unittest.cc b/tools/gn/path_output_unittest.cc
index 131f55ec5faa2245caac72992709e121fbfbabbc..65dae8dda08a798b0a134021410b53868046d25a 100644
--- a/tools/gn/path_output_unittest.cc
+++ b/tools/gn/path_output_unittest.cc
@@ -84,8 +84,8 @@ TEST(PathOutput, NinjaEscaping) {
{
// Not other weird stuff
std::ostringstream out;
- writer.WriteFile(out, SourceFile("//foo/\"foo\\bar\".cc"));
- EXPECT_EQ("../../foo/\"foo\\bar\".cc", out.str());
+ writer.WriteFile(out, SourceFile("//foo/\"foo\".cc"));
+ EXPECT_EQ("../../foo/\"foo\".cc", out.str());
}
}
@@ -127,19 +127,18 @@ TEST(PathOutput, NinjaForkEscaping) {
EXPECT_EQ("../../foo/\\\"foobar\\\".cc", out.str());
}
-
// Backslashes should get escaped on non-Windows and preserved on Windows.
writer.set_escape_platform(ESCAPE_PLATFORM_WIN);
{
std::ostringstream out;
- writer.WriteFile(out, SourceFile("//foo\\bar.cc"));
- EXPECT_EQ("../../foo\\bar.cc", out.str());
+ writer.WriteFile(out, OutputFile("foo\\bar.cc"));
+ EXPECT_EQ("foo\\bar.cc", out.str());
}
writer.set_escape_platform(ESCAPE_PLATFORM_POSIX);
{
std::ostringstream out;
- writer.WriteFile(out, SourceFile("//foo\\bar.cc"));
- EXPECT_EQ("../../foo\\\\bar.cc", out.str());
+ writer.WriteFile(out, OutputFile("foo\\bar.cc"));
+ EXPECT_EQ("foo\\\\bar.cc", out.str());
}
}
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/source_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698