summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkthoms2009-07-29 12:01:01 (EDT)
committer kthoms2009-07-29 12:01:01 (EDT)
commit5d8c2d3388802c30b77d04df319608e7c56f5e19 (patch)
tree3842a09ce6cc9bc0ec57ac62bce7a7967cdbde96
parentccd870875a193c347fa7bcf160b416e278f72e05 (diff)
downloadorg.eclipse.mwe-5d8c2d3388802c30b77d04df319608e7c56f5e19.zip
org.eclipse.mwe-5d8c2d3388802c30b77d04df319608e7c56f5e19.tar.gz
org.eclipse.mwe-5d8c2d3388802c30b77d04df319608e7c56f5e19.tar.bz2
added test for Bug212994
-rw-r--r--tests/org.eclipse.emf.mwe.tests/resources/test/res/build.xml11
-rw-r--r--tests/org.eclipse.emf.mwe.tests/resources/test/res/testAnt.mwe4
-rw-r--r--tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/core/ant/WorkflowAntTaskTest.java20
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/org.eclipse.emf.mwe.tests/resources/test/res/build.xml b/tests/org.eclipse.emf.mwe.tests/resources/test/res/build.xml
new file mode 100644
index 0000000..592969b
--- /dev/null
+++ b/tests/org.eclipse.emf.mwe.tests/resources/test/res/build.xml
@@ -0,0 +1,11 @@
+<project name="mwe-test" basedir="." default="generate">
+
+ <target name='generate'>
+ <taskdef name="workflow" classname="org.eclipse.emf.mwe.core.ant.WorkflowAntTask" />
+ <workflow file='test/res/testAnt.mwe'>
+ <param name='baseDir' value='/base/' />
+ <param name="blah" value="dah"/>
+ </workflow>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.mwe.tests/resources/test/res/testAnt.mwe b/tests/org.eclipse.emf.mwe.tests/resources/test/res/testAnt.mwe
new file mode 100644
index 0000000..923abb4
--- /dev/null
+++ b/tests/org.eclipse.emf.mwe.tests/resources/test/res/testAnt.mwe
@@ -0,0 +1,4 @@
+<workflow>
+ <property name="base" value="${baseDir}"/>
+ <property name="foo" value="${blah}"/>
+</workflow> \ No newline at end of file
diff --git a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/core/ant/WorkflowAntTaskTest.java b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/core/ant/WorkflowAntTaskTest.java
new file mode 100644
index 0000000..4019258
--- /dev/null
+++ b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/core/ant/WorkflowAntTaskTest.java
@@ -0,0 +1,20 @@
+package org.eclipse.emf.mwe.core.ant;
+
+import org.apache.tools.ant.Main;
+
+import junit.framework.TestCase;
+
+/**
+ * This test cannot be executed as plugin test!
+ * @author thoms
+ *
+ */
+public class WorkflowAntTaskTest extends TestCase {
+ /**
+ * When adding more then one <tt>param</tt> tag the WorkflowAntTasks will fail with a Usage description.
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=212994
+ */
+ public void testBug212994 () {
+ Main.start(new String[]{"-f","resources/test/res/build.xml"}, null, WorkflowAntTaskTest.class.getClassLoader());
+ }
+}