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

Unified Diff: tools/gn/escape_unittest.cc

Issue 440333002: Support more configurability in GN toolchains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: tools/gn/escape_unittest.cc
diff --git a/tools/gn/escape_unittest.cc b/tools/gn/escape_unittest.cc
index 1a79a78b671c531ce646e6532e0b0a75b7a03518..fd4934861e4b84997bb0390de4cd70e02a3c8abe 100644
--- a/tools/gn/escape_unittest.cc
+++ b/tools/gn/escape_unittest.cc
@@ -50,3 +50,11 @@ TEST(Escape, PosixCommand) {
// Some more generic shell chars.
EXPECT_EQ("a_\\;\\<\\*b", EscapeString("a_;<*b", opts, NULL));
}
+
+TEST(Escape, NinjaPreformatted) {
+ EscapeOptions opts;
+ opts.mode = ESCAPE_NINJA_PREFORMATTED_COMMAND;
+
+ // Only $ is escaped.
+ EXPECT_EQ("a: \"$$\\b<;", EscapeString("a: \"$\\b<;", opts, NULL));
+}

Powered by Google App Engine
This is Rietveld 408576698