[groovy] branch master updated: Add one more test for GINQ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[groovy] branch master updated: Add one more test for GINQ

Daniel.Sun
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 d265dfb  Add one more test for GINQ
d265dfb is described below

commit d265dfb75cb9347917895a0f57737863cd6183e2
Author: Daniel Sun <[hidden email]>
AuthorDate: Sat Nov 21 14:46:32 2020 +0800

    Add one more test for GINQ
---
 .../src/spec/test/org/apache/groovy/ginq/GinqTest.groovy  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
index 0afdeae..5666541 100644
--- a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
+++ b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
@@ -923,6 +923,21 @@ class GinqTest {
     }
 
     @Test
+    void "testGinq - nested from - 23"() {
+        assertScript '''
+            assert ['ab'] == GQ {
+                from s in ['a', 'ab', 'bck']
+                where s.size() in (
+                    from x in ['ak', 'bg']
+                    where x[0] == s[0]
+                    select x.size()
+                )
+                select s
+            }.toList()
+        '''
+    }
+
+    @Test
     void "testGinq - from leftjoin select - 1"() {
         assertScript '''
             def nums1 = [1, 2, 3]

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun