| Index: tools/gn/parser_unittest.cc
|
| diff --git a/tools/gn/parser_unittest.cc b/tools/gn/parser_unittest.cc
|
| index 6f08c723eb1e88a6d97b83910dcd58fb87e39c3d..5a428be0d5b538b10a5823d8ab47e93243498e03 100644
|
| --- a/tools/gn/parser_unittest.cc
|
| +++ b/tools/gn/parser_unittest.cc
|
| @@ -589,6 +589,31 @@ TEST(Parser, CommentsSuffixDifferentLine) {
|
| DoParserPrintTest(input, expected);
|
| }
|
|
|
| +TEST(Parser, CommentsSuffixMultiple) {
|
| + const char* input =
|
| + "executable(\"wee\") {\n"
|
| + " sources = [\n"
|
| + " \"a\", # This is a comment,\n"
|
| + " # and some more,\n" // Note that this is aligned with above.
|
| + " # then the end.\n"
|
| + " ]\n"
|
| + "}\n";
|
| + const char* expected =
|
| + "BLOCK\n"
|
| + " FUNCTION(executable)\n"
|
| + " LIST\n"
|
| + " LITERAL(\"wee\")\n"
|
| + " BLOCK\n"
|
| + " BINARY(=)\n"
|
| + " IDENTIFIER(sources)\n"
|
| + " LIST\n"
|
| + " LITERAL(\"a\")\n"
|
| + " +SUFFIX_COMMENT(\"# This is a comment,\")\n"
|
| + " +SUFFIX_COMMENT(\"# and some more,\")\n"
|
| + " +SUFFIX_COMMENT(\"# then the end.\")\n";
|
| + DoParserPrintTest(input, expected);
|
| +}
|
| +
|
| TEST(Parser, HangingIf) {
|
| DoParserErrorTest("if", 1, 1);
|
| }
|
|
|