| Index: tools/gn/parser_unittest.cc
|
| diff --git a/tools/gn/parser_unittest.cc b/tools/gn/parser_unittest.cc
|
| index 5a428be0d5b538b10a5823d8ab47e93243498e03..226143ac8f6a46d9d128dd7ab4ce41a7a5fc07a6 100644
|
| --- a/tools/gn/parser_unittest.cc
|
| +++ b/tools/gn/parser_unittest.cc
|
| @@ -498,7 +498,7 @@ TEST(Parser, CommentsStandalone) {
|
| "executable(\"wee\") {}\n";
|
| const char* expected =
|
| "BLOCK\n"
|
| - " +BEFORE_COMMENT(\"# Toplevel comment.\")\n"
|
| + " BLOCK_COMMENT(# Toplevel comment.)\n"
|
| " FUNCTION(executable)\n"
|
| " LIST\n"
|
| " LITERAL(\"wee\")\n"
|
| @@ -614,6 +614,25 @@ TEST(Parser, CommentsSuffixMultiple) {
|
| DoParserPrintTest(input, expected);
|
| }
|
|
|
| +TEST(Parser, CommentsConnectedInList) {
|
| + const char* input =
|
| + "defines = [\n"
|
| + "\n"
|
| + " # Connected comment.\n"
|
| + " \"WEE\",\n"
|
| + " \"BLORPY\",\n"
|
| + "]\n";
|
| + const char* expected =
|
| + "BLOCK\n"
|
| + " BINARY(=)\n"
|
| + " IDENTIFIER(defines)\n"
|
| + " LIST\n"
|
| + " LITERAL(\"WEE\")\n"
|
| + " +BEFORE_COMMENT(\"# Connected comment.\")\n"
|
| + " LITERAL(\"BLORPY\")\n";
|
| + DoParserPrintTest(input, expected);
|
| +}
|
| +
|
| TEST(Parser, HangingIf) {
|
| DoParserErrorTest("if", 1, 1);
|
| }
|
|
|