| Index: tools/gn/escape_unittest.cc
|
| diff --git a/tools/gn/escape_unittest.cc b/tools/gn/escape_unittest.cc
|
| index fd4934861e4b84997bb0390de4cd70e02a3c8abe..f2b2eae19742e1451b17a5126d8710cf85275f1c 100644
|
| --- a/tools/gn/escape_unittest.cc
|
| +++ b/tools/gn/escape_unittest.cc
|
| @@ -8,7 +8,7 @@
|
| TEST(Escape, Ninja) {
|
| EscapeOptions opts;
|
| opts.mode = ESCAPE_NINJA;
|
| - std::string result = EscapeString("asdf: \"$\\bar", opts, NULL);
|
| + std::string result = EscapeString("asdf: \"$\\bar", opts, nullptr);
|
| EXPECT_EQ("asdf$:$ \"$$\\bar", result);
|
| }
|
|
|
| @@ -18,7 +18,7 @@ TEST(Escape, WindowsCommand) {
|
| opts.platform = ESCAPE_PLATFORM_WIN;
|
|
|
| // Regular string is passed, even if it has backslashes.
|
| - EXPECT_EQ("foo\\bar", EscapeString("foo\\bar", opts, NULL));
|
| + EXPECT_EQ("foo\\bar", EscapeString("foo\\bar", opts, nullptr));
|
|
|
| // Spaces means the string is quoted, normal backslahes untouched.
|
| bool needs_quoting = false;
|
| @@ -33,10 +33,10 @@ TEST(Escape, WindowsCommand) {
|
| opts.inhibit_quoting = false;
|
|
|
| // Backslashes at the end of the string get escaped.
|
| - EXPECT_EQ("\"foo$ bar\\\\\\\\\"", EscapeString("foo bar\\\\", opts, NULL));
|
| + EXPECT_EQ("\"foo$ bar\\\\\\\\\"", EscapeString("foo bar\\\\", opts, nullptr));
|
|
|
| // Backslashes preceeding quotes are escaped, and the quote is escaped.
|
| - EXPECT_EQ("\"foo\\\\\\\"$ bar\"", EscapeString("foo\\\" bar", opts, NULL));
|
| + EXPECT_EQ("\"foo\\\\\\\"$ bar\"", EscapeString("foo\\\" bar", opts, nullptr));
|
| }
|
|
|
| TEST(Escape, PosixCommand) {
|
| @@ -45,10 +45,10 @@ TEST(Escape, PosixCommand) {
|
| opts.platform = ESCAPE_PLATFORM_POSIX;
|
|
|
| // : and $ ninja escaped with $. Then Shell-escape backslashes and quotes.
|
| - EXPECT_EQ("a$:\\$ \\\"\\$$\\\\b", EscapeString("a: \"$\\b", opts, NULL));
|
| + EXPECT_EQ("a$:\\$ \\\"\\$$\\\\b", EscapeString("a: \"$\\b", opts, nullptr));
|
|
|
| // Some more generic shell chars.
|
| - EXPECT_EQ("a_\\;\\<\\*b", EscapeString("a_;<*b", opts, NULL));
|
| + EXPECT_EQ("a_\\;\\<\\*b", EscapeString("a_;<*b", opts, nullptr));
|
| }
|
|
|
| TEST(Escape, NinjaPreformatted) {
|
| @@ -56,5 +56,5 @@ TEST(Escape, NinjaPreformatted) {
|
| opts.mode = ESCAPE_NINJA_PREFORMATTED_COMMAND;
|
|
|
| // Only $ is escaped.
|
| - EXPECT_EQ("a: \"$$\\b<;", EscapeString("a: \"$\\b<;", opts, NULL));
|
| + EXPECT_EQ("a: \"$$\\b<;", EscapeString("a: \"$\\b<;", opts, nullptr));
|
| }
|
|
|