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

Unified Diff: tools/gn/escape_unittest.cc

Issue 2809633002: Add curly brackets to list of characters that gn needs to escape (Closed)
Patch Set: Created 3 years, 8 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/escape.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/escape_unittest.cc
diff --git a/tools/gn/escape_unittest.cc b/tools/gn/escape_unittest.cc
index f2b2eae19742e1451b17a5126d8710cf85275f1c..fc7692d2da29c641a3c38cb77ab2c3a1c36f2613 100644
--- a/tools/gn/escape_unittest.cc
+++ b/tools/gn/escape_unittest.cc
@@ -49,6 +49,10 @@ TEST(Escape, PosixCommand) {
// Some more generic shell chars.
EXPECT_EQ("a_\\;\\<\\*b", EscapeString("a_;<*b", opts, nullptr));
+
+ // Curly braces must be escaped to avoid brace expansion on systems using
+ // bash as default shell..
+ EXPECT_EQ("\\{a,b\\}\\{c,d\\}", EscapeString("{a,b}{c,d}", opts, nullptr));
}
TEST(Escape, NinjaPreformatted) {
« no previous file with comments | « tools/gn/escape.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698