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

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


The following commit(s) were added to refs/heads/GROOVY-8258 by this push:
     new ba93d2f  GROOVY-8258: add more test cases
ba93d2f is described below

commit ba93d2f329b4c4bc054728d8b0eb7af8ccaa3177
Author: Daniel Sun <[email protected]>
AuthorDate: Sun Oct 11 18:21:07 2020 +0800

    GROOVY-8258: add more test cases
---
 .../groovy/org/apache/groovy/linq/GinqTest.groovy  | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git 
a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
 
b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
index de05ecb..011870c 100644
--- 
a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
+++ 
b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
@@ -774,6 +774,40 @@ class GinqTest {
     }
 
     @Test
+    void "testGinq - nested from - 18"() {
+        assertScript '''
+            assert [1, 2] == GINQ {
+                from n in (
+                    from m in [0, 1, 2]
+                    select m
+                )
+                where n in (
+                    from m in [1, 2]
+                    select m
+                )
+                select n
+            }.toList()
+        '''
+    }
+
+    @Test
+    void "testGinq - nested from - 19"() {
+        assertScript '''
+            assert [1, 2] == GINQ {
+                from n in (
+                    from n in [0, 1, 2]
+                    select n
+                )
+                where n in (
+                    from m in [1, 2]
+                    select m
+                )
+                select n
+            }.toList()
+        '''
+    }
+
+    @Test
     void "testGinq - from leftjoin select - 1"() {
         assertScript '''
             def nums1 = [1, 2, 3]

Reply via email to