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 2e38c1e GROOVY-8258: Add 1 more error test
2e38c1e is described below
commit 2e38c1e6f8856c5fed3e12fa16f891594d99a649
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
}