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
commit 07073498a044a78efc256748b1ab693f5197c286 Author: Daniel Sun <[email protected]> AuthorDate: Tue Oct 6 00:34:09 2020 +0800 GROOVY-8258: Add 1 more error test --- .../test/groovy/org/apache/groovy/linq/GinqErrorTest.groovy | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqErrorTest.groovy b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqErrorTest.groovy index cee78af..40831db 100644 --- a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqErrorTest.groovy +++ b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqErrorTest.groovy @@ -45,6 +45,19 @@ class GinqErrorTest { def err = shouldFail '''\ def numbers = [0, 1, 2] GINQ { + from n as numbers + select n + } + ''' + + assert err.toString().contains('`in` is expected for `from`, e.g. `from n in nums` @ line 3, column 17.') + } + + @Test + void "testGinq - from select - 3"() { + def err = shouldFail '''\ + def numbers = [0, 1, 2] + GINQ { from n, numbers select n }
