ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant BuildFileTest.java
Date Fri, 11 Oct 2002 14:19:56 GMT
bodewig     2002/10/11 07:19:56

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Delete.java
               src/testcases/org/apache/tools/ant Tag: ANT_15_BRANCH
                        BuildFileTest.java
  Log:
  merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.31.2.2  +152 -3    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
  retrieving revision 1.31.2.1
  retrieving revision 1.31.2.2
  diff -u -r1.31.2.1 -r1.31.2.2
  --- Delete.java	19 Jun 2002 01:22:12 -0000	1.31.2.1
  +++ Delete.java	11 Oct 2002 14:19:56 -0000	1.31.2.2
  @@ -59,6 +59,22 @@
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.PatternSet;
  +import org.apache.tools.ant.types.selectors.AndSelector;
  +import org.apache.tools.ant.types.selectors.ContainsSelector;
  +import org.apache.tools.ant.types.selectors.DateSelector;
  +import org.apache.tools.ant.types.selectors.DependSelector;
  +import org.apache.tools.ant.types.selectors.DepthSelector;
  +import org.apache.tools.ant.types.selectors.ExtendSelector;
  +import org.apache.tools.ant.types.selectors.FileSelector;
  +import org.apache.tools.ant.types.selectors.FilenameSelector;
  +import org.apache.tools.ant.types.selectors.MajoritySelector;
  +import org.apache.tools.ant.types.selectors.NoneSelector;
  +import org.apache.tools.ant.types.selectors.NotSelector;
  +import org.apache.tools.ant.types.selectors.OrSelector;
  +import org.apache.tools.ant.types.selectors.PresentSelector;
  +import org.apache.tools.ant.types.selectors.SelectSelector;
  +import org.apache.tools.ant.types.selectors.SelectorContainer;
  +import org.apache.tools.ant.types.selectors.SizeSelector;
   import java.io.File;
   import java.util.Vector;
   
  @@ -263,6 +279,139 @@
       }
   
       /**
  +     * Sets case sensitivity of the file system
  +     *
  +     * @param isCaseSensitive "true"|"on"|"yes" if file system is case
  +     *                           sensitive, "false"|"off"|"no" when not.
  +     */
  +    public void setCaseSensitive(boolean isCaseSensitive) {
  +        usedMatchingTask = true;
  +        super.setCaseSensitive(isCaseSensitive);
  +    }
  +
  +    /**
  +     * Sets whether or not symbolic links should be followed.
  +     *
  +     * @param followSymlinks whether or not symbolic links should be followed
  +     */
  +    public void setFollowSymlinks(boolean followSymlinks) {
  +        usedMatchingTask = true;
  +        super.setFollowSymlinks(followSymlinks);
  +    }
  +
  +    /**
  +     * add a "Select" selector entry on the selector list
  +     */
  +    public void addSelector(SelectSelector selector) {
  +        usedMatchingTask = true;
  +        super.addSelector(selector);
  +    }
  +
  +    /**
  +     * add an "And" selector entry on the selector list
  +     */
  +    public void addAnd(AndSelector selector) {
  +        usedMatchingTask = true;
  +        super.addAnd(selector);
  +    }
  +
  +    /**
  +     * add an "Or" selector entry on the selector list
  +     */
  +    public void addOr(OrSelector selector) {
  +        usedMatchingTask = true;
  +        super.addOr(selector);
  +    }
  +
  +    /**
  +     * add a "Not" selector entry on the selector list
  +     */
  +    public void addNot(NotSelector selector) {
  +        usedMatchingTask = true;
  +        super.addNot(selector);
  +    }
  +
  +    /**
  +     * add a "None" selector entry on the selector list
  +     */
  +    public void addNone(NoneSelector selector) {
  +        usedMatchingTask = true;
  +        super.addNone(selector);
  +    }
  +
  +    /**
  +     * add a majority selector entry on the selector list
  +     */
  +    public void addMajority(MajoritySelector selector) {
  +        usedMatchingTask = true;
  +        super.addMajority(selector);
  +    }
  +
  +    /**
  +     * add a selector date entry on the selector list
  +     */
  +    public void addDate(DateSelector selector) {
  +        usedMatchingTask = true;
  +        super.addDate(selector);
  +    }
  +
  +    /**
  +     * add a selector size entry on the selector list
  +     */
  +    public void addSize(SizeSelector selector) {
  +        usedMatchingTask = true;
  +        super.addSize(selector);
  +    }
  +
  +    /**
  +     * add a selector filename entry on the selector list
  +     */
  +    public void addFilename(FilenameSelector selector) {
  +        usedMatchingTask = true;
  +        super.addFilename(selector);
  +    }
  +
  +    /**
  +     * add an extended selector entry on the selector list
  +     */
  +    public void addCustom(ExtendSelector selector) {
  +        usedMatchingTask = true;
  +        super.addCustom(selector);
  +    }
  +
  +    /**
  +     * add a contains selector entry on the selector list
  +     */
  +    public void addContains(ContainsSelector selector) {
  +        usedMatchingTask = true;
  +        super.addContains(selector);
  +    }
  +
  +    /**
  +     * add a present selector entry on the selector list
  +     */
  +    public void addPresent(PresentSelector selector) {
  +        usedMatchingTask = true;
  +        super.addPresent(selector);
  +    }
  +
  +    /**
  +     * add a depth selector entry on the selector list
  +     */
  +    public void addDepth(DepthSelector selector) {
  +        usedMatchingTask = true;
  +        super.addDepth(selector);
  +    }
  +
  +    /**
  +     * add a depends selector entry on the selector list
  +     */
  +    public void addDepend(DependSelector selector) {
  +        usedMatchingTask = true;
  +        super.addDepend(selector);
  +    }
  +
  +    /**
        * Delete the file(s).
        */
       public void execute() throws BuildException {
  @@ -279,7 +428,7 @@
   
           if (quiet && failonerror) {
               throw new BuildException("quiet and failonerror cannot both be "
  -                                     + "set to true", location);
  +                                     + "set to true", getLocation());
           }
           
   
  @@ -331,10 +480,10 @@
           for (int i = 0; i < filesets.size(); i++) {
               FileSet fs = (FileSet) filesets.elementAt(i);
               try {
  -                DirectoryScanner ds = fs.getDirectoryScanner(project);
  +                DirectoryScanner ds = fs.getDirectoryScanner(getProject());
                   String[] files = ds.getIncludedFiles();
                   String[] dirs = ds.getIncludedDirectories();
  -                removeFiles(fs.getDir(project), files, dirs);
  +                removeFiles(fs.getDir(getProject()), files, dirs);
               } catch (BuildException be) {
                   // directory doesn't exist or is not readable
                   if (failonerror) {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.14.2.2  +16 -0     jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java
  
  Index: BuildFileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java,v
  retrieving revision 1.14.2.1
  retrieving revision 1.14.2.2
  diff -u -r1.14.2.1 -r1.14.2.2
  --- BuildFileTest.java	4 Jul 2002 07:38:40 -0000	1.14.2.1
  +++ BuildFileTest.java	11 Oct 2002 14:19:56 -0000	1.14.2.2
  @@ -345,6 +345,22 @@
           assertEquals("property " + property,value,result);
       }
   
  +    /**
  +     * assert that a property equals &quot;true&quot;
  +     * @param property property name
  +     */
  +    protected void assertPropertySet(String property) {
  +        assertPropertyEquals(property, "true");
  +    }
  +
  +    /**
  +     * assert that a property is null
  +     * @param property property name
  +     */
  +    protected void assertPropertyUnset(String property) {
  +        assertPropertyEquals(property, null);
  +    }
  +
   
       /**
        * call a target, verify named property is "true".
  
  
  

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


Mime
View raw message