Author: antelder
Date: Fri Oct 26 11:24:12 2007
New Revision: 588735
URL: http://svn.apache.org/viewvc?rev=588735&view=rev
Log:
Add a testcase to verify the latest Groovy script engine works with the Groovy
1.1 release
Added:
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml (with props)
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/main/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/main/java/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/main/resources/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
(with props)
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/resources/
Modified:
jakarta/bsf/trunk/bsf3/testing/pom.xml
Added: jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml
URL:
http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml?rev=588735&view=auto
==============================================================================
--- jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml (added)
+++ jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml Fri Oct 26 11:24:12 2007
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<project>
+ <parent>
+ <groupId>org.apache.bsf</groupId>
+ <artifactId>parent</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <groupId>org.apache.bsf.testing</groupId>
+ <artifactId>bsf-testing-groovy-1.1</artifactId>
+ <name>Apache BSF testing for Groovy 1.1 release</name>
+ <description>Apache BSF testing for Groovy</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.bsf</groupId>
+ <artifactId>bsf-all</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.1-rc-1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: jakarta/bsf/trunk/bsf3/testing/groovy-1.1/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
URL:
http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java?rev=588735&view=auto
==============================================================================
---
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
(added)
+++
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
Fri Oct 26 11:24:12 2007
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.bsf.testing.groovy;
+
+import javax.script.Invocable;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+
+import junit.framework.TestCase;
+
+/**
+ * Simple hello testcase to verify basic Groovy functionality
+ */
+public class GroovyTestcase extends TestCase {
+
+ public void testInvokeFunction() throws ScriptException,
NoSuchMethodException {
+ ScriptEngineManager manager = new ScriptEngineManager();
+ ScriptEngine engine = manager.getEngineByExtension("groovy");
+ engine.eval("def hello(name) { return 'Hello ' + name }" );
+ assertTrue(engine instanceof Invocable);
+ Invocable invocableScript = (Invocable) engine;
+ assertEquals("Hello petra",
invocableScript.invokeFunction("hello", new Object[]{"petra"}));
+ }
+
+}
Propchange:
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
jakarta/bsf/trunk/bsf3/testing/groovy-1.1/src/test/java/org/apache/bsf/testing/groovy/GroovyTestcase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: jakarta/bsf/trunk/bsf3/testing/pom.xml
URL:
http://svn.apache.org/viewvc/jakarta/bsf/trunk/bsf3/testing/pom.xml?rev=588735&r1=588734&r2=588735&view=diff
==============================================================================
--- jakarta/bsf/trunk/bsf3/testing/pom.xml (original)
+++ jakarta/bsf/trunk/bsf3/testing/pom.xml Fri Oct 26 11:24:12 2007
@@ -39,6 +39,7 @@
<modules>
<module>e4x</module>
<module>groovy</module>
+ <module>groovy-1.1</module>
<module>javascript</module>
<module>python</module>
<module>ruby</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]