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 2019/05/04 05:38:55 UTC
[groovy] branch master updated: Add a test for GROOVY-9105
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 05fe23a Add a test for GROOVY-9105
05fe23a is described below
commit 05fe23a5fcc54845966f92d70d32cb0c468d3e05
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat May 4 13:38:37 2019 +0800
Add a test for GROOVY-9105
---
.../test/groovy/groovy/ant/Groovy9105Test.groovy | 43 ++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/subprojects/groovy-ant/src/test/groovy/groovy/ant/Groovy9105Test.groovy b/subprojects/groovy-ant/src/test/groovy/groovy/ant/Groovy9105Test.groovy
new file mode 100644
index 0000000..2db503f
--- /dev/null
+++ b/subprojects/groovy-ant/src/test/groovy/groovy/ant/Groovy9105Test.groovy
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package groovy.ant
+
+class Groovy9105Test extends AntTestCase {
+ void testGenerateStubs() {
+ doInTmpDir { ant, baseDir ->
+ baseDir.src {
+ 'ConcreteClass.groovy'('''
+ class ConcreteClass { }
+ ''')
+ 'AbstractClass.groovy'('''
+ abstract class AbstractClass extends ConcreteClass implements GroovyObject { }
+ ''')
+ 'JavaClass.java'('''
+ public class JavaClass extends AbstractClass { }
+ ''')
+ }
+
+ ant.mkdir(dir: 'build')
+ ant.taskdef(name: 'generateStubs', classname: 'org.codehaus.groovy.ant.GenerateStubsTask')
+ ant.generateStubs(srcdir: 'src', destdir: 'build')
+ def buildDir = new File(ant.project.baseDir,"build")
+ assert ['AbstractClass.java', 'ConcreteClass.java'].sort() == (buildDir.list() as List).sort()
+ }
+ }
+}