Commit 7fd3f671 authored by ollel's avatar ollel Committed by Commit bot

Add curly brackets to list of characters that gn needs to escape

Curly brackets {} needs to be escaped to avoid brace expansion
on systems using bash as the default shell.

BUG=709934

Review-Url: https://codereview.chromium.org/2809633002
Cr-Commit-Position: refs/heads/master@{#466286}
parent 58cb30d4
......@@ -27,7 +27,7 @@ const char kShellValid[0x80] = {
// ` a b c d e f g h i j k l m n o
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
// p q r s t u v w x y z { | } ~
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0 };
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
// Append one character to the given string, escaping it for Ninja.
//
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment