ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r743227 [2/2] - in /ant/core/trunk/src: main/org/apache/tools/ant/ main/org/apache/tools/ant/input/ main/org/apache/tools/ant/listener/ main/org/apache/tools/ant/taskdefs/ main/org/apache/tools/ant/taskdefs/condition/ main/org/apache/tools/...
Date Wed, 11 Feb 2009 05:02:36 GMT
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java Wed Feb 11 05:02:33 2009
@@ -1,425 +1,425 @@
-/*
- *  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.tools.ant.taskdefs.optional.junit;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.Vector;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.BuildListener;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.util.FileUtils;
-
-/**
- * <p>Collects all failing test <i>cases</i> and creates a new JUnit test class containing
- * a suite() method which calls these failed tests.</p>
- * <p>Having classes <i>A</i> ... <i>D</i> with each several testcases you could earn a new
- * test class like
- * <pre>
- * // generated on: 2007.08.06 09:42:34,555
- * import junit.framework.*;
- * public class FailedTests extends TestCase {
- *     public FailedTests(String testname) {
- *         super(testname);
- *     }
- *     public static Test suite() {
- *         TestSuite suite = new TestSuite();
- *         suite.addTest( new B("test04") );
- *         suite.addTest( new org.D("test10") );
- *         return suite;
- *     }
- * }
- * </pre>
- *
- * Because each running test case gets its own formatter, we collect
- * the failing test cases in a static list. Because we dont have a finalizer
- * method in the formatters "lifecycle", we register this formatter as
- * BuildListener and generate the new java source on taskFinished event.
- *
- * @since Ant 1.8.0
- */
-public class FailureRecorder extends ProjectComponent implements JUnitResultFormatter, BuildListener {
-
-    /**
-     * This is the name of a magic System property ({@value}). The value of this
-     * <b>System</b> property should point to the location where to store the
-     * generated class (without suffix).
-     * Default location and name is defined in DEFAULT_CLASS_LOCATION.
-     * @see #DEFAULT_CLASS_LOCATION
-     */
-    public static final String MAGIC_PROPERTY_CLASS_LOCATION
-        = "ant.junit.failureCollector";
-
-    /** Default location and name for the generated JUnit class file. {@value} */
-    public static final String DEFAULT_CLASS_LOCATION
-        = System.getProperty("java.io.tmpdir") + "FailedTests";
-
-    /** Prefix for logging. {@value} */
-    private static final String LOG_PREFIX = "    [junit]";
-
-    /** Class names of failed tests without duplicates. */
-    private static SortedSet/*<TestInfos>*/ failedTests = new TreeSet();
-
-    /** A writer for writing the generated source to. */
-    private PrintWriter writer;
-
-    /**
-     * Location and name of the generated JUnit class.
-     * Lazy instantiated via getLocationName().
-     */
-    private static String locationName;
-
-    /**
-     * Returns the (lazy evaluated) location for the collector class.
-     * Order for evaluation: System property > Ant property > default value
-     * @return location for the collector class
-     * @see #MAGIC_PROPERTY_CLASS_LOCATION
-     * @see #DEFAULT_CLASS_LOCATION
-     */
-    private String getLocationName() {
-        if (locationName == null) {
-            String syspropValue = System.getProperty(MAGIC_PROPERTY_CLASS_LOCATION);
-            String antpropValue = getProject().getProperty(MAGIC_PROPERTY_CLASS_LOCATION);
-
-            if (syspropValue != null) {
-                locationName = syspropValue;
-                verbose("System property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' set, so use "
-                        + "its value '" + syspropValue + "' as location for collector class.");
-            } else if (antpropValue != null) {
-                locationName = antpropValue;
-                verbose("Ant property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' set, so use "
-                        + "its value '" + antpropValue + "' as location for collector class.");
-            } else {
-                locationName = DEFAULT_CLASS_LOCATION;
-                verbose("System property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' not set, so use "
-                        + "value as location for collector class: '"
-                        + DEFAULT_CLASS_LOCATION + "'");
-            }
-
-            File locationFile = new File(locationName);
-            if (!locationFile.isAbsolute()) {
-                File f = new File(getProject().getBaseDir(), locationName);
-                locationName = f.getAbsolutePath();
-                verbose("Location file is relative (" + locationFile + ")"
-                        + " use absolute path instead (" + locationName + ")");
-            }
-        }
-
-        return locationName;
-    }
-
-    /**
-     * This method is called by the Ant runtime by reflection. We use the project reference for
-     * registration of this class as BuildListener.
-     *
-     * @param project
-     *            project reference
-     */
-    public void setProject(Project project) {
-        // store project reference for logging
-        super.setProject(project);
-        // check if already registered
-        boolean alreadyRegistered = false;
-        Vector allListeners = project.getBuildListeners();
-        for (int i = 0; i < allListeners.size(); i++) {
-            Object listener = allListeners.get(i);
-            if (listener instanceof FailureRecorder) {
-                alreadyRegistered = true;
-                continue;
-            }
-        }
-        // register if needed
-        if (!alreadyRegistered) {
-            verbose("Register FailureRecorder (@" + this.hashCode() + ") as BuildListener");
-            project.addBuildListener(this);
-        }
-    }
-
-    // ===== JUnitResultFormatter =====
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void endTestSuite(JUnitTest suite) throws BuildException {
-    }
-
-    /**
-     * Add the failed test to the list.
-     * @param test the test that errored.
-     * @param throwable the reason it errored.
-     * @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable)
-     */
-    public void addError(Test test, Throwable throwable) {
-        failedTests.add(new TestInfos(test));
-    }
-
-    // CheckStyle:LineLengthCheck OFF - @see is long
-    /**
-     * Add the failed test to the list.
-     * @param test the test that failed.
-     * @param error the assertion that failed.
-     * @see junit.framework.TestListener#addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
-     */
-    // CheckStyle:LineLengthCheck ON
-    public void addFailure(Test test, AssertionFailedError error) {
-        failedTests.add(new TestInfos(test));
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void setOutput(OutputStream out) {
-        // unused, close output file so it can be deleted before the VM exits
-        if (out != System.out) {
-            FileUtils.close(out);
-        }
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void setSystemError(String err) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void setSystemOutput(String out) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void startTestSuite(JUnitTest suite) throws BuildException {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void endTest(Test test) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void startTest(Test test) {
-    }
-
-    // ===== "Templates" for generating the JUnit class =====
-
-    private void writeJavaClass() {
-        try {
-            File sourceFile = new File((getLocationName() + ".java"));
-            verbose("Write collector class to '" + sourceFile.getAbsolutePath() + "'");
-
-            sourceFile.delete();
-            writer = new PrintWriter(new FileOutputStream(sourceFile));
-
-            createClassHeader();
-            createSuiteMethod();
-            createClassFooter();
-
-            FileUtils.close(writer);
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void createClassHeader() {
-        String className = getLocationName().replace('\\', '/');
-        if (className.indexOf('/') > -1) {
-            className = className.substring(className.lastIndexOf('/') + 1);
-        }
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss,SSS");
-        writer.print("// generated on: ");
-        writer.println(sdf.format(new Date()));
-        writer.println("import junit.framework.*;");
-        writer.print("public class ");
-        writer.print(className);
-        // If this class does not extend TC, Ant doesnt run these
-        writer.println(" extends TestCase {");
-        // standard String-constructor
-        writer.print("    public ");
-        writer.print(className);
-        writer.println("(String testname) {");
-        writer.println("        super(testname);");
-        writer.println("    }");
-    }
-
-    private void createSuiteMethod() {
-        writer.println("    public static Test suite() {");
-        writer.println("        TestSuite suite = new TestSuite();");
-        for (Iterator iter = failedTests.iterator(); iter.hasNext();) {
-            TestInfos testInfos = (TestInfos) iter.next();
-            writer.print("        suite.addTest(");
-            writer.print(testInfos);
-            writer.println(");");
-        }
-        writer.println("        return suite;");
-        writer.println("    }");
-    }
-
-    private void createClassFooter() {
-        writer.println("}");
-    }
-
-    // ===== Helper classes and methods =====
-
-    /**
-     * Logging facade in INFO-mode.
-     * @param message Log-message
-     */
-    public void log(String message) {
-        getProject().log(LOG_PREFIX + " " + message, Project.MSG_INFO);
-    }
-
-    /**
-     * Logging facade in VERBOSE-mode.
-     * @param message Log-message
-     */
-    public void verbose(String message) {
-        getProject().log(LOG_PREFIX + " " + message, Project.MSG_VERBOSE);
-    }
-
-    /**
-     * TestInfos holds information about a given test for later use.
-     */
-    public class TestInfos implements Comparable {
-
-        /** The class name of the test. */
-        private String className;
-
-        /** The method name of the testcase. */
-        private String methodName;
-
-        /**
-         * This constructor extracts the needed information from the given test.
-         * @param test Test to analyze
-         */
-        public TestInfos(Test test) {
-            className = test.getClass().getName();
-            methodName = test.toString();
-            methodName = methodName.substring(0, methodName.indexOf('('));
-        }
-
-        /**
-         * This String-Representation can directly be used for instantiation of
-         * the JUnit testcase.
-         * @return the string representation.
-         * @see java.lang.Object#toString()
-         * @see FailureRecorder#createSuiteMethod()
-         */
-        public String toString() {
-            return "new " + className + "(\"" + methodName + "\")";
-        }
-
-        /**
-         * The SortedMap needs comparable elements.
-         * @param other the object to compare to.
-         * @return the result of the comparison.
-         * @see java.lang.Comparable#compareTo(T)
-         * @see SortedSet#comparator()
-         */
-        public int compareTo(Object other) {
-            if (other instanceof TestInfos) {
-                TestInfos otherInfos = (TestInfos) other;
-                return toString().compareTo(otherInfos.toString());
-            } else {
-                return -1;
-            }
-        }
-    }
-
-    // ===== BuildListener =====
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void buildFinished(BuildEvent event) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void buildStarted(BuildEvent event) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void messageLogged(BuildEvent event) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void targetFinished(BuildEvent event) {
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void targetStarted(BuildEvent event) {
-    }
-
-    /**
-     * The task outside of this JUnitResultFormatter is the <junit> task. So all tests passed
-     * and we could create the new java class.
-     * @param event  not used
-     * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
-     */
-    public void taskFinished(BuildEvent event) {
-        if (!failedTests.isEmpty()) {
-            writeJavaClass();
-        }
-    }
-
-    /**
-     * Not used
-     * {@inheritDoc}
-     */
-    public void taskStarted(BuildEvent event) {
-    }
-
-}
+/*
+ *  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.tools.ant.taskdefs.optional.junit;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.Vector;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.util.FileUtils;
+
+/**
+ * <p>Collects all failing test <i>cases</i> and creates a new JUnit test class containing
+ * a suite() method which calls these failed tests.</p>
+ * <p>Having classes <i>A</i> ... <i>D</i> with each several testcases you could earn a new
+ * test class like
+ * <pre>
+ * // generated on: 2007.08.06 09:42:34,555
+ * import junit.framework.*;
+ * public class FailedTests extends TestCase {
+ *     public FailedTests(String testname) {
+ *         super(testname);
+ *     }
+ *     public static Test suite() {
+ *         TestSuite suite = new TestSuite();
+ *         suite.addTest( new B("test04") );
+ *         suite.addTest( new org.D("test10") );
+ *         return suite;
+ *     }
+ * }
+ * </pre>
+ *
+ * Because each running test case gets its own formatter, we collect
+ * the failing test cases in a static list. Because we dont have a finalizer
+ * method in the formatters "lifecycle", we register this formatter as
+ * BuildListener and generate the new java source on taskFinished event.
+ *
+ * @since Ant 1.8.0
+ */
+public class FailureRecorder extends ProjectComponent implements JUnitResultFormatter, BuildListener {
+
+    /**
+     * This is the name of a magic System property ({@value}). The value of this
+     * <b>System</b> property should point to the location where to store the
+     * generated class (without suffix).
+     * Default location and name is defined in DEFAULT_CLASS_LOCATION.
+     * @see #DEFAULT_CLASS_LOCATION
+     */
+    public static final String MAGIC_PROPERTY_CLASS_LOCATION
+        = "ant.junit.failureCollector";
+
+    /** Default location and name for the generated JUnit class file. {@value} */
+    public static final String DEFAULT_CLASS_LOCATION
+        = System.getProperty("java.io.tmpdir") + "FailedTests";
+
+    /** Prefix for logging. {@value} */
+    private static final String LOG_PREFIX = "    [junit]";
+
+    /** Class names of failed tests without duplicates. */
+    private static SortedSet/*<TestInfos>*/ failedTests = new TreeSet();
+
+    /** A writer for writing the generated source to. */
+    private PrintWriter writer;
+
+    /**
+     * Location and name of the generated JUnit class.
+     * Lazy instantiated via getLocationName().
+     */
+    private static String locationName;
+
+    /**
+     * Returns the (lazy evaluated) location for the collector class.
+     * Order for evaluation: System property > Ant property > default value
+     * @return location for the collector class
+     * @see #MAGIC_PROPERTY_CLASS_LOCATION
+     * @see #DEFAULT_CLASS_LOCATION
+     */
+    private String getLocationName() {
+        if (locationName == null) {
+            String syspropValue = System.getProperty(MAGIC_PROPERTY_CLASS_LOCATION);
+            String antpropValue = getProject().getProperty(MAGIC_PROPERTY_CLASS_LOCATION);
+
+            if (syspropValue != null) {
+                locationName = syspropValue;
+                verbose("System property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' set, so use "
+                        + "its value '" + syspropValue + "' as location for collector class.");
+            } else if (antpropValue != null) {
+                locationName = antpropValue;
+                verbose("Ant property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' set, so use "
+                        + "its value '" + antpropValue + "' as location for collector class.");
+            } else {
+                locationName = DEFAULT_CLASS_LOCATION;
+                verbose("System property '" + MAGIC_PROPERTY_CLASS_LOCATION + "' not set, so use "
+                        + "value as location for collector class: '"
+                        + DEFAULT_CLASS_LOCATION + "'");
+            }
+
+            File locationFile = new File(locationName);
+            if (!locationFile.isAbsolute()) {
+                File f = new File(getProject().getBaseDir(), locationName);
+                locationName = f.getAbsolutePath();
+                verbose("Location file is relative (" + locationFile + ")"
+                        + " use absolute path instead (" + locationName + ")");
+            }
+        }
+
+        return locationName;
+    }
+
+    /**
+     * This method is called by the Ant runtime by reflection. We use the project reference for
+     * registration of this class as BuildListener.
+     *
+     * @param project
+     *            project reference
+     */
+    public void setProject(Project project) {
+        // store project reference for logging
+        super.setProject(project);
+        // check if already registered
+        boolean alreadyRegistered = false;
+        Vector allListeners = project.getBuildListeners();
+        for (int i = 0; i < allListeners.size(); i++) {
+            Object listener = allListeners.get(i);
+            if (listener instanceof FailureRecorder) {
+                alreadyRegistered = true;
+                continue;
+            }
+        }
+        // register if needed
+        if (!alreadyRegistered) {
+            verbose("Register FailureRecorder (@" + this.hashCode() + ") as BuildListener");
+            project.addBuildListener(this);
+        }
+    }
+
+    // ===== JUnitResultFormatter =====
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void endTestSuite(JUnitTest suite) throws BuildException {
+    }
+
+    /**
+     * Add the failed test to the list.
+     * @param test the test that errored.
+     * @param throwable the reason it errored.
+     * @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable)
+     */
+    public void addError(Test test, Throwable throwable) {
+        failedTests.add(new TestInfos(test));
+    }
+
+    // CheckStyle:LineLengthCheck OFF - @see is long
+    /**
+     * Add the failed test to the list.
+     * @param test the test that failed.
+     * @param error the assertion that failed.
+     * @see junit.framework.TestListener#addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
+     */
+    // CheckStyle:LineLengthCheck ON
+    public void addFailure(Test test, AssertionFailedError error) {
+        failedTests.add(new TestInfos(test));
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void setOutput(OutputStream out) {
+        // unused, close output file so it can be deleted before the VM exits
+        if (out != System.out) {
+            FileUtils.close(out);
+        }
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void setSystemError(String err) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void setSystemOutput(String out) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void startTestSuite(JUnitTest suite) throws BuildException {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void endTest(Test test) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void startTest(Test test) {
+    }
+
+    // ===== "Templates" for generating the JUnit class =====
+
+    private void writeJavaClass() {
+        try {
+            File sourceFile = new File((getLocationName() + ".java"));
+            verbose("Write collector class to '" + sourceFile.getAbsolutePath() + "'");
+
+            sourceFile.delete();
+            writer = new PrintWriter(new FileOutputStream(sourceFile));
+
+            createClassHeader();
+            createSuiteMethod();
+            createClassFooter();
+
+            FileUtils.close(writer);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void createClassHeader() {
+        String className = getLocationName().replace('\\', '/');
+        if (className.indexOf('/') > -1) {
+            className = className.substring(className.lastIndexOf('/') + 1);
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss,SSS");
+        writer.print("// generated on: ");
+        writer.println(sdf.format(new Date()));
+        writer.println("import junit.framework.*;");
+        writer.print("public class ");
+        writer.print(className);
+        // If this class does not extend TC, Ant doesnt run these
+        writer.println(" extends TestCase {");
+        // standard String-constructor
+        writer.print("    public ");
+        writer.print(className);
+        writer.println("(String testname) {");
+        writer.println("        super(testname);");
+        writer.println("    }");
+    }
+
+    private void createSuiteMethod() {
+        writer.println("    public static Test suite() {");
+        writer.println("        TestSuite suite = new TestSuite();");
+        for (Iterator iter = failedTests.iterator(); iter.hasNext();) {
+            TestInfos testInfos = (TestInfos) iter.next();
+            writer.print("        suite.addTest(");
+            writer.print(testInfos);
+            writer.println(");");
+        }
+        writer.println("        return suite;");
+        writer.println("    }");
+    }
+
+    private void createClassFooter() {
+        writer.println("}");
+    }
+
+    // ===== Helper classes and methods =====
+
+    /**
+     * Logging facade in INFO-mode.
+     * @param message Log-message
+     */
+    public void log(String message) {
+        getProject().log(LOG_PREFIX + " " + message, Project.MSG_INFO);
+    }
+
+    /**
+     * Logging facade in VERBOSE-mode.
+     * @param message Log-message
+     */
+    public void verbose(String message) {
+        getProject().log(LOG_PREFIX + " " + message, Project.MSG_VERBOSE);
+    }
+
+    /**
+     * TestInfos holds information about a given test for later use.
+     */
+    public class TestInfos implements Comparable {
+
+        /** The class name of the test. */
+        private String className;
+
+        /** The method name of the testcase. */
+        private String methodName;
+
+        /**
+         * This constructor extracts the needed information from the given test.
+         * @param test Test to analyze
+         */
+        public TestInfos(Test test) {
+            className = test.getClass().getName();
+            methodName = test.toString();
+            methodName = methodName.substring(0, methodName.indexOf('('));
+        }
+
+        /**
+         * This String-Representation can directly be used for instantiation of
+         * the JUnit testcase.
+         * @return the string representation.
+         * @see java.lang.Object#toString()
+         * @see FailureRecorder#createSuiteMethod()
+         */
+        public String toString() {
+            return "new " + className + "(\"" + methodName + "\")";
+        }
+
+        /**
+         * The SortedMap needs comparable elements.
+         * @param other the object to compare to.
+         * @return the result of the comparison.
+         * @see java.lang.Comparable#compareTo(T)
+         * @see SortedSet#comparator()
+         */
+        public int compareTo(Object other) {
+            if (other instanceof TestInfos) {
+                TestInfos otherInfos = (TestInfos) other;
+                return toString().compareTo(otherInfos.toString());
+            } else {
+                return -1;
+            }
+        }
+    }
+
+    // ===== BuildListener =====
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void buildFinished(BuildEvent event) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void buildStarted(BuildEvent event) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void messageLogged(BuildEvent event) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void targetFinished(BuildEvent event) {
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void targetStarted(BuildEvent event) {
+    }
+
+    /**
+     * The task outside of this JUnitResultFormatter is the <junit> task. So all tests passed
+     * and we could create the new java class.
+     * @param event  not used
+     * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+     */
+    public void taskFinished(BuildEvent event) {
+        if (!failedTests.isEmpty()) {
+            writeJavaClass();
+        }
+    }
+
+    /**
+     * Not used
+     * {@inheritDoc}
+     */
+    public void taskStarted(BuildEvent event) {
+    }
+
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileProvider.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileProvider.java?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileProvider.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileProvider.java Wed Feb 11 05:02:33 2009
@@ -1,36 +1,36 @@
-/*
- *  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.tools.ant.types.resources;
-
-import java.io.File;
-
-/**
- * This is an interface that resources that can provide a file should implement.
- * This is a refactoring of {@link FileResource}, to allow other resources
- * to act as sources of files (and to make components that only support
- * file-based resources from only support FileResource resources.
- * @since Ant 1.8
- */
-public interface FileProvider {
-    /**
-     * Get the file represented by this Resource.
-     * @return the file.
-     */
-    File getFile();
-}
+/*
+ *  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.tools.ant.types.resources;
+
+import java.io.File;
+
+/**
+ * This is an interface that resources that can provide a file should implement.
+ * This is a refactoring of {@link FileResource}, to allow other resources
+ * to act as sources of files (and to make components that only support
+ * file-based resources from only support FileResource resources.
+ * @since Ant 1.8
+ */
+public interface FileProvider {
+    /**
+     * Get the file represented by this Resource.
+     * @return the file.
+     */
+    File getFile();
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/core/location/location.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/location/location.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/core/location/location.xml (original)
+++ ant/core/trunk/src/tests/antunit/core/location/location.xml Wed Feb 11 05:02:33 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -15,79 +15,79 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project name="location-test" basedir="." default="all"
-       xmlns:au="antlib:org.apache.ant.antunit">
-       
-  <property name="ant.build.dir" location="../../../../../build"/>
-  <property name="working.dir"
-            location="${ant.build.dir}/ant-unit/location-dir"/>
-  <property name="classes.dir" location="${working.dir}/classes"/>
-  
-  <target name="all">
-    <au:antunit>
-      <fileset file="${ant.file}"/>
-      <au:plainlistener/>
-    </au:antunit>
-  </target>
-  
-  <target name="setUp">
-    <mkdir dir="${classes.dir}"/>
-    <javac srcdir="src" destdir="${classes.dir}" debug="yes"/>
-    <taskdef name="echo-location" classname="task.EchoLocation"
-             classpath="${classes.dir}"/>
-  </target>
-  
-  <target name="define">
-    <taskdef name="echoloc"
-      classname="task.EchoLocation">
-      <classpath>
-        <pathelement location="${classes.dir}" />
-        <pathelement path="${java.class.path}"/>
-      </classpath>
-    </taskdef>
-  </target>
-  
-  <target name="macrodef" depends="define">
-    <macrodef name="echoloc2" backtrace="false">
-      <sequential>
-        <echoloc/>
-      </sequential>
-    </macrodef>
-  </target>
-  
-  <target name="presetdef" depends="define">
-    <presetdef name="echoloc3">
-      <echoloc/>
-    </presetdef>
-  </target>
-  
-  <target name="tearDown">
-    <delete dir="${working.dir}"/>
-  </target>
-  
-  <target name="test-plain-task">
-    <echo id="echo">Hello</echo>
-    <au:assertLogContains text="Hello"/>
-  </target>
-  
-  <target name="test-standalone-type">
-    <!-- TODO -->
-  </target>
-  
-  <target name="test-condition-task">
-    <!-- TODO -->
-  </target>
-  
-  <target name="test-macrodef-wrapped-task" depends="macrodef">
-    <echo id="echo3">Hello</echo>
-    <echoloc2/>
-    <au:assertLogContains text="Line: "/>
-  </target>
-  
-  <target name="test-presetdef-wrapped-task" depends="presetdef">
-    <echo id="echo4">Hello</echo>
-    <echoloc3/>
-    <au:assertLogContains text="Line: "/>
-  </target>
-  
-</project>
+<project name="location-test" basedir="." default="all"
+       xmlns:au="antlib:org.apache.ant.antunit">
+       
+  <property name="ant.build.dir" location="../../../../../build"/>
+  <property name="working.dir"
+            location="${ant.build.dir}/ant-unit/location-dir"/>
+  <property name="classes.dir" location="${working.dir}/classes"/>
+  
+  <target name="all">
+    <au:antunit>
+      <fileset file="${ant.file}"/>
+      <au:plainlistener/>
+    </au:antunit>
+  </target>
+  
+  <target name="setUp">
+    <mkdir dir="${classes.dir}"/>
+    <javac srcdir="src" destdir="${classes.dir}" debug="yes"/>
+    <taskdef name="echo-location" classname="task.EchoLocation"
+             classpath="${classes.dir}"/>
+  </target>
+  
+  <target name="define">
+    <taskdef name="echoloc"
+      classname="task.EchoLocation">
+      <classpath>
+        <pathelement location="${classes.dir}" />
+        <pathelement path="${java.class.path}"/>
+      </classpath>
+    </taskdef>
+  </target>
+  
+  <target name="macrodef" depends="define">
+    <macrodef name="echoloc2" backtrace="false">
+      <sequential>
+        <echoloc/>
+      </sequential>
+    </macrodef>
+  </target>
+  
+  <target name="presetdef" depends="define">
+    <presetdef name="echoloc3">
+      <echoloc/>
+    </presetdef>
+  </target>
+  
+  <target name="tearDown">
+    <delete dir="${working.dir}"/>
+  </target>
+  
+  <target name="test-plain-task">
+    <echo id="echo">Hello</echo>
+    <au:assertLogContains text="Hello"/>
+  </target>
+  
+  <target name="test-standalone-type">
+    <!-- TODO -->
+  </target>
+  
+  <target name="test-condition-task">
+    <!-- TODO -->
+  </target>
+  
+  <target name="test-macrodef-wrapped-task" depends="macrodef">
+    <echo id="echo3">Hello</echo>
+    <echoloc2/>
+    <au:assertLogContains text="Line: "/>
+  </target>
+  
+  <target name="test-presetdef-wrapped-task" depends="presetdef">
+    <echo id="echo4">Hello</echo>
+    <echoloc3/>
+    <au:assertLogContains text="Line: "/>
+  </target>
+  
+</project>

Propchange: ant/core/trunk/src/tests/antunit/core/location/location.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/core/location/src/task/EchoLocation.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/location/src/task/EchoLocation.java?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/core/location/src/task/EchoLocation.java (original)
+++ ant/core/trunk/src/tests/antunit/core/location/src/task/EchoLocation.java Wed Feb 11 05:02:33 2009
@@ -1,26 +1,26 @@
-/*
-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 task;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-
-public class EchoLocation extends Task {
-	public void execute() {
-        log("Line: " + getLocation().getLineNumber(), Project.MSG_INFO);
-    }
+/*
+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 task;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+public class EchoLocation extends Task {
+	public void execute() {
+        log("Line: " + getLocation().getLineNumber(), Project.MSG_INFO);
+    }
 }
\ No newline at end of file

Propchange: ant/core/trunk/src/tests/antunit/core/location/src/task/EchoLocation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/condition/antversion-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/antversion-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/antversion-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/condition/antversion-test.xml Wed Feb 11 05:02:33 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -15,56 +15,56 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project name="antversion-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
-
-  <target name="test-atleast">
-    <au:assertTrue message="Expected antversion of ${ant.version} to be at least 1.7.0">
-        <!-- AntVersion was introduced like AntUnit in 1.7 - so this must be true -->
-    	<antversion atleast="1.7.0"/>
-    </au:assertTrue>	
-  </target>
-
-  <target name="test-exactly">
-    <antversion property="ant.actual.version"/>
-    <au:assertTrue message="Expected antversion of ${ant.actual.version}">
-    	<antversion exactly="${ant.actual.version}"/>
-    </au:assertTrue>	
-  </target>
-
-  <target name="test-atleast-fail">
-  	<property name="version" value="1.8.9"/>
-    <au:assertFalse>
-   	  <antversion atleast="1.9.0"/>
-    </au:assertFalse>
-  </target>
-    
-  <target name="test-task">
-    <antversion property="antversion"/>
-    <au:assertPropertySet name="antversion" message="Property 'antversion' should be set."/>
-    <echo>AntVersion=${antversion}</echo>  
-  </target>    
-    
-  <target name="test-property-conditional1">
-    <antversion property="antversion" atleast="2.0.0"/>
-    <au:assertTrue message="Property 'antversion' should not be set because this is not Ant 2.0.0+.">
-      <not>
-        <isset property="antversion"/>  
-      </not>  
-    </au:assertTrue>  
-  </target>
-    
-  <target name="test-property-conditional2">
-    <antversion property="antversion" atleast="1.7.0"/>
-    <au:assertTrue message="Property 'antversion' should be set because we should have Ant 1.7.0+ (${ant.version}).">
-      <isset property="antversion"/>  
-    </au:assertTrue>  
-  </target>
-
-  <target name="all">
-    <au:antunit>
-      <fileset file="${ant.file}"/>
-      <au:plainlistener/>
-    </au:antunit>
-  </target>
-
-</project>
+<project name="antversion-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
+
+  <target name="test-atleast">
+    <au:assertTrue message="Expected antversion of ${ant.version} to be at least 1.7.0">
+        <!-- AntVersion was introduced like AntUnit in 1.7 - so this must be true -->
+    	<antversion atleast="1.7.0"/>
+    </au:assertTrue>	
+  </target>
+
+  <target name="test-exactly">
+    <antversion property="ant.actual.version"/>
+    <au:assertTrue message="Expected antversion of ${ant.actual.version}">
+    	<antversion exactly="${ant.actual.version}"/>
+    </au:assertTrue>	
+  </target>
+
+  <target name="test-atleast-fail">
+  	<property name="version" value="1.8.9"/>
+    <au:assertFalse>
+   	  <antversion atleast="1.9.0"/>
+    </au:assertFalse>
+  </target>
+    
+  <target name="test-task">
+    <antversion property="antversion"/>
+    <au:assertPropertySet name="antversion" message="Property 'antversion' should be set."/>
+    <echo>AntVersion=${antversion}</echo>  
+  </target>    
+    
+  <target name="test-property-conditional1">
+    <antversion property="antversion" atleast="2.0.0"/>
+    <au:assertTrue message="Property 'antversion' should not be set because this is not Ant 2.0.0+.">
+      <not>
+        <isset property="antversion"/>  
+      </not>  
+    </au:assertTrue>  
+  </target>
+    
+  <target name="test-property-conditional2">
+    <antversion property="antversion" atleast="1.7.0"/>
+    <au:assertTrue message="Property 'antversion' should be set because we should have Ant 1.7.0+ (${ant.version}).">
+      <isset property="antversion"/>  
+    </au:assertTrue>  
+  </target>
+
+  <target name="all">
+    <au:antunit>
+      <fileset file="${ant.file}"/>
+      <au:plainlistener/>
+    </au:antunit>
+  </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/condition/antversion-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml Wed Feb 11 05:02:33 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -15,43 +15,43 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project name="hasfreespace-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
-
-  <available property="jdk6.available" classname="java.util.ServiceLoader"/>
-
-  <property name="partition" value="${user.home}" />
-
-
-  <target name="test-not-enough-space-human" if="jdk6.available">
-    <au:assertFalse>
-      <hasfreespace partition="${partition}" needed="1P"/>
-    </au:assertFalse>	
-  </target>
-
-  <target name="test-enough-space-human" if="jdk6.available">
-    <au:assertTrue>
-      <hasfreespace partition="${partition}" needed="1K"/>
-    </au:assertTrue>	
-  </target>
-
-  <target name="test-not-enough-space" if="jdk6.available">
-  	<property name="long.max-value" value="9223372036854775807"/>
-    <au:assertFalse>
-   	  <hasfreespace partition="${partition}" needed="${long.max-value}"/>
-    </au:assertFalse>
-  </target>
-		
-  <target name="test-enough-space" if="jdk6.available">
-    <au:assertTrue>
-      <hasfreespace partition="${partition}" needed="1"/>			
-    </au:assertTrue>	
-  </target>
-
-  <target name="all">
-    <au:antunit>
-      <fileset file="${ant.file}"/>
-      <au:plainlistener/>
-    </au:antunit>
-  </target>
-
+<project name="hasfreespace-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
+
+  <available property="jdk6.available" classname="java.util.ServiceLoader"/>
+
+  <property name="partition" value="${user.home}" />
+
+
+  <target name="test-not-enough-space-human" if="jdk6.available">
+    <au:assertFalse>
+      <hasfreespace partition="${partition}" needed="1P"/>
+    </au:assertFalse>	
+  </target>
+
+  <target name="test-enough-space-human" if="jdk6.available">
+    <au:assertTrue>
+      <hasfreespace partition="${partition}" needed="1K"/>
+    </au:assertTrue>	
+  </target>
+
+  <target name="test-not-enough-space" if="jdk6.available">
+  	<property name="long.max-value" value="9223372036854775807"/>
+    <au:assertFalse>
+   	  <hasfreespace partition="${partition}" needed="${long.max-value}"/>
+    </au:assertFalse>
+  </target>
+		
+  <target name="test-enough-space" if="jdk6.available">
+    <au:assertTrue>
+      <hasfreespace partition="${partition}" needed="1"/>			
+    </au:assertTrue>	
+  </target>
+
+  <target name="all">
+    <au:antunit>
+      <fileset file="${ant.file}"/>
+      <au:plainlistener/>
+    </au:antunit>
+  </target>
+
 </project>
\ No newline at end of file

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/echoxml-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/echoxml-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/echoxml-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/echoxml-test.xml Wed Feb 11 05:02:33 2009
@@ -1,87 +1,87 @@
-<?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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
-
-  <!-- note relies on antunit 1.1 -->
-  <import file="../antunit-base.xml"/>
-
-  <target name="setUp">
-    <property name="file" location="${output}/echoed.xml"/>
-    <mkdir dir="${output}"/>
-    <echoxml file="${file}">
-      <project>
-        <property name="foo" value="bar" />
-        <fail message="$$$${foo}=$${foo}">
-          <condition>
-            <istrue value="${mustfail}" />
-          </condition>
-        </fail>
-      </project>
-    </echoxml>
-  </target>
-  
-  <target name="testPass">
-    <ant antfile="${file}"/>
-  </target>
-  
-  <target name="testFail">
-    <au:expectfailure expectedmessage="${foo}=bar" message="Should have thrown an exception">
-      <ant antfile="${file}">
-        <property name="mustfail" value="true" />
-      </ant>
-    </au:expectfailure>
-  </target>
-  
-  <target name="testEmpty">
-    <au:expectfailure expectedmessage="No nested XML specified" message="Should have thrown an exception">
-      <echoxml />
-    </au:expectfailure>
-  </target>
-  
- <!-- comment this and the next targets if you don't have the svn
-      trunk of antunit -->
-  <target name="test-ns-all">
-    <echoxml file="${file}" xmlns:a="antlib:a"
-             namespacepolicy="all">
-      <a:something a:foo="bar"/>
-    </echoxml>
-    <au:assertResourceContains resource="${file}" value="a:something"/>
-    <au:assertResourceContains resource="${file}" value="antlib:a"/>
-  </target>
-
-  <target name="test-ns-elementsOnly">
-    <echoxml file="${file}" xmlns:a="antlib:a"
-             namespacepolicy="elementsOnly">
-      <a:something a:foo="bar"/>
-    </echoxml>
-    <au:assertResourceContains resource="${file}" value="a:something"/>
-    <au:assertResourceContains resource="${file}" value="antlib:a"/>
-  </target>
-
-  <target name="test-ns-ignore">
-    <echoxml file="${file}" xmlns:a="antlib:a"
-             namespacepolicy="ignore">
-      <a:something a:foo="bar"/>
-    </echoxml>
-    <au:assertResourceContains resource="${file}" value="a:something"/>
-    <au:assertFalse message="Didn't expecte ${file} to contain antlib:a">
-      <resourcecontains resource="${file}" substring="antlib:a"/>
-    </au:assertFalse>
-  </target>
-
-</project>
+<?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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
+
+  <!-- note relies on antunit 1.1 -->
+  <import file="../antunit-base.xml"/>
+
+  <target name="setUp">
+    <property name="file" location="${output}/echoed.xml"/>
+    <mkdir dir="${output}"/>
+    <echoxml file="${file}">
+      <project>
+        <property name="foo" value="bar" />
+        <fail message="$$$${foo}=$${foo}">
+          <condition>
+            <istrue value="${mustfail}" />
+          </condition>
+        </fail>
+      </project>
+    </echoxml>
+  </target>
+  
+  <target name="testPass">
+    <ant antfile="${file}"/>
+  </target>
+  
+  <target name="testFail">
+    <au:expectfailure expectedmessage="${foo}=bar" message="Should have thrown an exception">
+      <ant antfile="${file}">
+        <property name="mustfail" value="true" />
+      </ant>
+    </au:expectfailure>
+  </target>
+  
+  <target name="testEmpty">
+    <au:expectfailure expectedmessage="No nested XML specified" message="Should have thrown an exception">
+      <echoxml />
+    </au:expectfailure>
+  </target>
+  
+ <!-- comment this and the next targets if you don't have the svn
+      trunk of antunit -->
+  <target name="test-ns-all">
+    <echoxml file="${file}" xmlns:a="antlib:a"
+             namespacepolicy="all">
+      <a:something a:foo="bar"/>
+    </echoxml>
+    <au:assertResourceContains resource="${file}" value="a:something"/>
+    <au:assertResourceContains resource="${file}" value="antlib:a"/>
+  </target>
+
+  <target name="test-ns-elementsOnly">
+    <echoxml file="${file}" xmlns:a="antlib:a"
+             namespacepolicy="elementsOnly">
+      <a:something a:foo="bar"/>
+    </echoxml>
+    <au:assertResourceContains resource="${file}" value="a:something"/>
+    <au:assertResourceContains resource="${file}" value="antlib:a"/>
+  </target>
+
+  <target name="test-ns-ignore">
+    <echoxml file="${file}" xmlns:a="antlib:a"
+             namespacepolicy="ignore">
+      <a:something a:foo="bar"/>
+    </echoxml>
+    <au:assertResourceContains resource="${file}" value="a:something"/>
+    <au:assertFalse message="Didn't expecte ${file} to contain antlib:a">
+      <resourcecontains resource="${file}" substring="antlib:a"/>
+    </au:assertFalse>
+  </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/echoxml-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml Wed Feb 11 05:02:33 2009
@@ -1,46 +1,46 @@
-<?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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
-
-    <!-- note relies on antunit 1.1 -->
-    <import file="../antunit-base.xml" />
-
-    <target name="setUp">
-        <mkdir dir="${output}" />
-        <mkdir dir="${output}/empty" />
-        <touch file="${output}/fileone" />
-        <touch file="${output}/filetwo" />
-    </target>
-
-    <target name="testFailNone">
-        <au:expectfailure expectedmessage="No resource selected, gzip needs exactly one resource." message="Should have thrown an exception">
-            <gzip destfile="${output}/file.gz">
-                <fileset dir="${output}/empty" />
-            </gzip>
-        </au:expectfailure>
-    </target>
-
-    <target name="testFailTwo">
-        <au:expectfailure expectedmessage="gzip cannot handle multiple resources at once. (2 resources were selected.)" message="Should have thrown an exception">
-            <gzip destfile="${output}/file.gz">
-                <fileset dir="${output}" />
-            </gzip>
-        </au:expectfailure>
-    </target>
-
-</project>
+<?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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
+
+    <!-- note relies on antunit 1.1 -->
+    <import file="../antunit-base.xml" />
+
+    <target name="setUp">
+        <mkdir dir="${output}" />
+        <mkdir dir="${output}/empty" />
+        <touch file="${output}/fileone" />
+        <touch file="${output}/filetwo" />
+    </target>
+
+    <target name="testFailNone">
+        <au:expectfailure expectedmessage="No resource selected, gzip needs exactly one resource." message="Should have thrown an exception">
+            <gzip destfile="${output}/file.gz">
+                <fileset dir="${output}/empty" />
+            </gzip>
+        </au:expectfailure>
+    </target>
+
+    <target name="testFailTwo">
+        <au:expectfailure expectedmessage="gzip cannot handle multiple resources at once. (2 resources were selected.)" message="Should have thrown an exception">
+            <gzip destfile="${output}/file.gz">
+                <fileset dir="${output}" />
+            </gzip>
+        </au:expectfailure>
+    </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/gzip-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/hostinfo-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/hostinfo-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/hostinfo-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/hostinfo-test.xml Wed Feb 11 05:02:33 2009
@@ -1,94 +1,94 @@
-<?xml version="1.0"?>
-<!--
-  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 name="hostinfo-test" default="antunit"
-         xmlns:au="antlib:org.apache.ant.antunit">
-
-  <import file="../antunit-base.xml" />
-
-  <property name="undef-name" value="nonexistenthost.nonexistentdomain" />
-  <property name="undef-hostname" value="nonexistenthost" />
-  <property name="undef-domainname" value="nonexistentdomain" />
-        
-  <property name="undef-ip4" value="0.0.0.0" />
-  <property name="undef-ip6" value="::" />
-      
-  <property name="apache-hostname" value="www.apache.org" />
-  <property name="apache-domain" value="apache.org" />
-  <property name="apache-realhost" value="eos" />
-  <property name="apache-ip4" value="140.211.11.130" />
-    
-  <property name="xs4all-hostname" value="www.xs4all.nl" />
-  <property name="xs4all-domain" value="xs4all.nl" />
-  <property name="xs4all-realhost" value="www" />
-  <property name="xs4all-ip4" value="194.109.6.92" />
-    
-  <target name="setUp">
-  </target>
-
-  <target name="testLocal" depends="setUp">
-    <hostinfo prefix="local" />
-      <!-- Do not know what to expect here, machine dependent -->
-  </target>
-
-    <target name="testApache" depends="setUp">
-      <hostinfo prefix="apache" host="${apache-hostname}"/>
-      <au:assertTrue>
-        <and>
-          <equals arg1="${apache.NAME}" arg2="${apache-realhost}" />
-          <equals arg1="${apache.DOMAIN}" arg2="${apache-domain}" />
-          <equals arg1="${apache.ADDR4}" arg2="${apache-ip4}" />
-        </and>
-      </au:assertTrue>
-    </target>
-
-    <target name="testApacheNoPrefix" depends="setUp">
-      <hostinfo host="${apache-hostname}"/>
-      <au:assertTrue>
-        <and>
-          <equals arg1="${NAME}" arg2="${apache-realhost}" />
-          <equals arg1="${DOMAIN}" arg2="${apache-domain}" />
-          <equals arg1="${ADDR4}" arg2="${apache-ip4}" />
-        </and>
-      </au:assertTrue>
-    </target>
-
-    <target name="testReverse" depends="setUp">
-      <hostinfo prefix="reverse" host="${xs4all-ip4}"/>
-      <au:assertTrue>
-        <and>
-          <equals arg1="${reverse.NAME}" arg2="${xs4all-realhost}" />
-          <equals arg1="${reverse.DOMAIN}" arg2="${xs4all-domain}" />
-          <equals arg1="${reverse.ADDR4}" arg2="${xs4all-ip4}" />
-        </and>
-      </au:assertTrue>
-    </target>
-    
-    
-    <target name="testUndef" depends="setUp">
-      <hostinfo prefix="undef" host="${undef-name}"/>
-      <au:assertTrue>
-        <and>
-          <equals arg1="${undef.NAME}" arg2="${undef-hostname}" />
-          <equals arg1="${undef.DOMAIN}" arg2="${undef-domainname}" />
-          <equals arg1="${undef.ADDR4}" arg2="${undef-ip4}" />
-          <equals arg1="${undef.ADDR6}" arg2="${undef-ip6}" />
-        </and>
-      </au:assertTrue>
-    </target>
-    
-</project>
+<?xml version="1.0"?>
+<!--
+  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 name="hostinfo-test" default="antunit"
+         xmlns:au="antlib:org.apache.ant.antunit">
+
+  <import file="../antunit-base.xml" />
+
+  <property name="undef-name" value="nonexistenthost.nonexistentdomain" />
+  <property name="undef-hostname" value="nonexistenthost" />
+  <property name="undef-domainname" value="nonexistentdomain" />
+        
+  <property name="undef-ip4" value="0.0.0.0" />
+  <property name="undef-ip6" value="::" />
+      
+  <property name="apache-hostname" value="www.apache.org" />
+  <property name="apache-domain" value="apache.org" />
+  <property name="apache-realhost" value="eos" />
+  <property name="apache-ip4" value="140.211.11.130" />
+    
+  <property name="xs4all-hostname" value="www.xs4all.nl" />
+  <property name="xs4all-domain" value="xs4all.nl" />
+  <property name="xs4all-realhost" value="www" />
+  <property name="xs4all-ip4" value="194.109.6.92" />
+    
+  <target name="setUp">
+  </target>
+
+  <target name="testLocal" depends="setUp">
+    <hostinfo prefix="local" />
+      <!-- Do not know what to expect here, machine dependent -->
+  </target>
+
+    <target name="testApache" depends="setUp">
+      <hostinfo prefix="apache" host="${apache-hostname}"/>
+      <au:assertTrue>
+        <and>
+          <equals arg1="${apache.NAME}" arg2="${apache-realhost}" />
+          <equals arg1="${apache.DOMAIN}" arg2="${apache-domain}" />
+          <equals arg1="${apache.ADDR4}" arg2="${apache-ip4}" />
+        </and>
+      </au:assertTrue>
+    </target>
+
+    <target name="testApacheNoPrefix" depends="setUp">
+      <hostinfo host="${apache-hostname}"/>
+      <au:assertTrue>
+        <and>
+          <equals arg1="${NAME}" arg2="${apache-realhost}" />
+          <equals arg1="${DOMAIN}" arg2="${apache-domain}" />
+          <equals arg1="${ADDR4}" arg2="${apache-ip4}" />
+        </and>
+      </au:assertTrue>
+    </target>
+
+    <target name="testReverse" depends="setUp">
+      <hostinfo prefix="reverse" host="${xs4all-ip4}"/>
+      <au:assertTrue>
+        <and>
+          <equals arg1="${reverse.NAME}" arg2="${xs4all-realhost}" />
+          <equals arg1="${reverse.DOMAIN}" arg2="${xs4all-domain}" />
+          <equals arg1="${reverse.ADDR4}" arg2="${xs4all-ip4}" />
+        </and>
+      </au:assertTrue>
+    </target>
+    
+    
+    <target name="testUndef" depends="setUp">
+      <hostinfo prefix="undef" host="${undef-name}"/>
+      <au:assertTrue>
+        <and>
+          <equals arg1="${undef.NAME}" arg2="${undef-hostname}" />
+          <equals arg1="${undef.DOMAIN}" arg2="${undef-domainname}" />
+          <equals arg1="${undef.ADDR4}" arg2="${undef-ip4}" />
+          <equals arg1="${undef.ADDR6}" arg2="${undef-ip6}" />
+        </and>
+      </au:assertTrue>
+    </target>
+    
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/hostinfo-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/taskdefs/loadresource-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/loadresource-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/loadresource-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/loadresource-test.xml Wed Feb 11 05:02:33 2009
@@ -1,41 +1,41 @@
-<?xml version="1.0"?>
-<!--
-  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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
-
-  <import file="../antunit-base.xml" />
-
-  <target name="test-resourceString">
-    <loadresource property="p">
-      <string value="one"/>
-    </loadresource >
-    <au:assertPropertyEquals name="p" value="one"/>
-  </target>
-
-  <target name="test-resourceSizeZero" description="Bug 42319">
-    <loadresource property="p">
-      <string value=""/>
-    </loadresource >
-    <au:assertTrue>
-      <not>
-        <isset property="p"/>
-      </not>
-    </au:assertTrue>
-    <au:assertLogContains text="Do not set property p as its length is 0."/>
-  </target>
-
-</project>
+<?xml version="1.0"?>
+<!--
+  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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
+
+  <import file="../antunit-base.xml" />
+
+  <target name="test-resourceString">
+    <loadresource property="p">
+      <string value="one"/>
+    </loadresource >
+    <au:assertPropertyEquals name="p" value="one"/>
+  </target>
+
+  <target name="test-resourceSizeZero" description="Bug 42319">
+    <loadresource property="p">
+      <string value=""/>
+    </loadresource >
+    <au:assertTrue>
+      <not>
+        <isset property="p"/>
+      </not>
+    </au:assertTrue>
+    <au:assertLogContains text="Do not set property p as its length is 0."/>
+  </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/taskdefs/loadresource-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/core/trunk/src/tests/antunit/types/resources/files-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/resources/files-test.xml?rev=743227&r1=743226&r2=743227&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/types/resources/files-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/types/resources/files-test.xml Wed Feb 11 05:02:33 2009
@@ -1,53 +1,53 @@
-<?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 name="files-test" default="antunit"
-         xmlns:au="antlib:org.apache.ant.antunit">
-
-  <target name="antunit">
-    <au:antunit>
-      <au:plainlistener />
-      <file file="${ant.file}" />
-    </au:antunit>
-  </target>
-  
-  <target name="setUp">
-    <property name="out" value="out"/>
-  </target>
-  
-  <target name="tearDown">
-    <delete dir="${out}"/>
-  </target>
-
-  <target name="testEmptyReference" description="Bug43048">
-    <files id="foo"/>
-    <mkdir dir="${out}"/>
-    <copy todir="${out}">
-      <!-- threw a java.lang.NullPointerException -->
-	  <files refid="foo"/>
-    </copy>
-  </target>
-
-  <target name="testEmptyFiles" description="Bug43048">
-    <mkdir dir="${out}"/>
-    <copy todir="${out}">
-      <files/>
-    </copy>
-  </target>
-
-
-</project>
+<?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 name="files-test" default="antunit"
+         xmlns:au="antlib:org.apache.ant.antunit">
+
+  <target name="antunit">
+    <au:antunit>
+      <au:plainlistener />
+      <file file="${ant.file}" />
+    </au:antunit>
+  </target>
+  
+  <target name="setUp">
+    <property name="out" value="out"/>
+  </target>
+  
+  <target name="tearDown">
+    <delete dir="${out}"/>
+  </target>
+
+  <target name="testEmptyReference" description="Bug43048">
+    <files id="foo"/>
+    <mkdir dir="${out}"/>
+    <copy todir="${out}">
+      <!-- threw a java.lang.NullPointerException -->
+	  <files refid="foo"/>
+    </copy>
+  </target>
+
+  <target name="testEmptyFiles" description="Bug43048">
+    <mkdir dir="${out}"/>
+    <copy todir="${out}">
+      <files/>
+    </copy>
+  </target>
+
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/types/resources/files-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message