ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r357651 - in /ant/core/trunk: docs/manual/CoreTasks/ src/etc/testcases/taskdefs/ src/etc/testcases/taskdefs/manifestclasspath/ src/testcases/org/apache/tools/ant/taskdefs/
Date Mon, 19 Dec 2005 06:07:47 GMT
Author: antoine
Date: Sun Dec 18 22:04:29 2005
New Revision: 357651

URL: http://svn.apache.org/viewcvs?rev=357651&view=rev
Log:
international tests for ManifestClassPath

Added:
    ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/
    ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java
    ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Beta.java
Modified:
    ant/core/trunk/docs/manual/CoreTasks/apply.html
    ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath.xml
    ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java

Modified: ant/core/trunk/docs/manual/CoreTasks/apply.html
URL: http://svn.apache.org/viewcvs/ant/core/trunk/docs/manual/CoreTasks/apply.html?rev=357651&r1=357650&r2=357651&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/apply.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/apply.html Sun Dec 18 22:04:29 2005
@@ -432,4 +432,4 @@
 Reserved.</p>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath.xml
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath.xml?rev=357651&r1=357650&r2=357651&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath.xml Sun Dec 18 22:04:29 2005
@@ -1,7 +1,10 @@
 <?xml version="1.0"?>
 
 <project name="manifestclasspath" default="tearDown">
-
+  <!-- hebrew -->
+  <property name="jom" value="&#1501;&#1493;&#1497;"/>
+  <!-- german -->
+  <property name="aent" value="&#227;nt"/> 
   <target name="setUp">
     <property name="tmp" location="${basedir}/${ant.project.name}.tmp" />
     <mkdir dir="${tmp}" />
@@ -161,4 +164,40 @@
     </manifestclasspath>
   </target>
 
+  <target name="international-german" depends="setUp">
+      <antcall target="run-two-jars">
+          <param name="ext.dir" value="${aent}"/>
+      </antcall>
+  </target>
+  <target name="international-hebrew" depends="setUp">
+      <antcall target="run-two-jars">
+          <param name="ext.dir" value="${jom}"/>
+      </antcall>
+  </target>
+  <target name="run-two-jars">
+     <mkdir dir="${tmp}/${ext.dir}"/>
+      <javac srcdir="manifestclasspath" destdir="${tmp}" />
+       <jar destfile="${tmp}/${ext.dir}/alpha.jar">
+          <fileset dir="${tmp}">
+              <include name="Alpha.class"/>
+          </fileset>
+       </jar>
+        <manifestclasspath property="jar.classpath"
+                       jarfile="${tmp}/beta.jar">
+        <classpath>
+           <pathelement location="${tmp}/beta.jar"/>
+           <pathelement location="${tmp}/${ext.dir}/alpha.jar"/>
+        </classpath>
+       </manifestclasspath>
+      <jar destfile="${tmp}/beta.jar" >
+          <fileset dir="${tmp}">
+              <include name="Beta.class"/>
+          </fileset>
+          <manifest>
+             <attribute name="Main-Class" value="Beta"/>
+             <attribute name="Class-Path" value="${jar.classpath}"/>
+          </manifest>
+      </jar>
+      <java fork="true" jar="${tmp}/beta.jar"/>
+    </target>
 </project>

Added: ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java?rev=357651&view=auto
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java (added)
+++ ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Alpha.java Sun Dec 18 22:04:29
2005
@@ -0,0 +1,5 @@
+public class Alpha {
+    public String toString() {
+	return "alpha";
+    }
+}

Added: ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Beta.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Beta.java?rev=357651&view=auto
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Beta.java (added)
+++ ant/core/trunk/src/etc/testcases/taskdefs/manifestclasspath/Beta.java Sun Dec 18 22:04:29
2005
@@ -0,0 +1,9 @@
+public class Beta extends Alpha {
+    public String toString() {
+	return "beta " + super.toString();
+    }
+    public static void main(String [] args) {
+	Beta myBeta = new Beta();
+	System.out.println(myBeta.toString());
+    }
+}

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java?rev=357651&r1=357650&r2=357651&view=diff
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java
(original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/ManifestClassPathTest.java
Sun Dec 18 22:04:29 2005
@@ -16,11 +16,8 @@
  */
 package org.apache.tools.ant.taskdefs;
 
-import java.io.File;
-
-import java.util.Map;
-import java.util.Properties;
 
+import org.apache.tools.ant.taskdefs.condition.Os;
 import org.apache.tools.ant.BuildFileTest;
 
 /**
@@ -133,6 +130,19 @@
                                               "../../resources/dsp-core/ " +
                                               "../../resources/dsp-pres/ " +
                                               "../../resources/dsp-void/");
+    }
+    public void testInternationalGerman() {
+        executeTarget("international-german");
+        expectLogContaining("run-two-jars", "beta alpha");
+    }
+    public void testInternationalHebrew() {
+        if (!Os.isFamily("windows")) {
+            executeTarget("international-hebrew");
+            expectLogContaining("run-two-jars", "beta alpha");
+        } else {
+            System.out.println("Test with hebrew path not attempted under Windows");
+        }
+
     }
 
 } // END class ManifestClassPathTest



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message