ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs PropertyTest.java
Date Thu, 31 Jul 2003 09:03:46 GMT
peterreilly    2003/07/31 02:03:46

  Modified:    src/etc/testcases/taskdefs property.xml
               src/testcases/org/apache/tools/ant/taskdefs
                        PropertyTest.java
  Log:
  Fix invalid URL for property test with url.
  PR: 21948
  
  Revision  Changes    Path
  1.10      +1 -1      ant/src/etc/testcases/taskdefs/property.xml
  
  Index: property.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/property.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- property.xml	24 Jul 2003 07:13:28 -0000	1.9
  +++ property.xml	31 Jul 2003 09:03:46 -0000	1.10
  @@ -24,7 +24,7 @@
   
     <target name="test5">
       <property name="http.port" value="999" />
  -    <property url="file://${basedir}/property3.properties"/>
  +    <property url="${test5.url}"/>
       <echo message="http.url is ${http.url}"/>
     </target>
   
  
  
  
  1.14      +14 -1     ant/src/testcases/org/apache/tools/ant/taskdefs/PropertyTest.java
  
  Index: PropertyTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/PropertyTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PropertyTest.java	24 Jul 2003 07:16:34 -0000	1.13
  +++ PropertyTest.java	31 Jul 2003 09:03:46 -0000	1.14
  @@ -54,8 +54,12 @@
   
   package org.apache.tools.ant.taskdefs;
   
  -import org.apache.tools.ant.*;
  +import java.net.URL;
  +import java.io.File;
  +
   import org.apache.tools.ant.BuildFileTest;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.util.FileUtils;
   
   /**
    * @author Conor MacNeill
  @@ -96,6 +100,15 @@
       }
   
       public void test5() {
  +        String baseDir = getProject().getProperty("basedir");
  +        try {
  +            String uri = FileUtils.newFileUtils().toURI(
  +                baseDir + "/property3.properties");
  +            getProject().setNewProperty(
  +                "test5.url", uri);
  +        } catch (Exception ex) {
  +            throw new BuildException(ex);
  +        }
           expectLog("test5", "http.url is http://localhost:999");
       }
   
  
  
  

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


Mime
View raw message