You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/08/23 23:51:10 UTC

[groovy] branch master updated: Add test for GROOVY-9692

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b9dc31  Add test for GROOVY-9692
9b9dc31 is described below

commit 9b9dc31e29717e8263361af3d4aaff2dd355184b
Author: Daniel Sun <su...@apache.org>
AuthorDate: Mon Aug 24 07:50:24 2020 +0800

    Add test for GROOVY-9692
---
 .../groovy/parser/antlr4/GroovyParserTest.groovy   |  4 ++++
 .../src/test/resources/bugs/BUG-GROOVY-9692.groovy | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy b/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
index 83e63f9..9b9418d 100644
--- a/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
+++ b/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
@@ -466,4 +466,8 @@ final class GroovyParserTest extends GroovyTestCase {
     void "test groovy core - GROOVY-9522"() {
         doTest('bugs/BUG-GROOVY-9522.groovy');
     }
+
+    void "test groovy core - GROOVY-9692"() {
+        doTest('bugs/BUG-GROOVY-9692.groovy');
+    }
 }
diff --git a/subprojects/parser-antlr4/src/test/resources/bugs/BUG-GROOVY-9692.groovy b/subprojects/parser-antlr4/src/test/resources/bugs/BUG-GROOVY-9692.groovy
new file mode 100644
index 0000000..a3a0898
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/bugs/BUG-GROOVY-9692.groovy
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+def result = [1, 2, 3] {
+    "world"
+}