ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java
Date Wed, 16 Jul 2003 11:09:23 GMT
bodewig     2003/07/16 04:09:22

  Modified:    src/testcases/org/apache/tools/ant DirectoryScannerTest.java
  Log:
  Add tests for case insensitive matching.
  
  Both tests with CaseInsensitive in their name fail on Linux, I expect
  test2ButCaseInsesitive to pass on case insensitive file systems.
  
  Will be either fixed or disabled shortly.
  
  Revision  Changes    Path
  1.14      +29 -0     ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java
  
  Index: DirectoryScannerTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DirectoryScannerTest.java	16 Jul 2003 10:57:56 -0000	1.13
  +++ DirectoryScannerTest.java	16 Jul 2003 11:09:19 -0000	1.14
  @@ -115,6 +115,35 @@
                                      "alpha/beta/gamma"});
       }
   
  +    public void testFullPathMatchesCaseSensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
  +        ds.scan();
  +        compareFiles(ds, new String[] {}, new String[] {});
  +    }
  +
  +    public void testFullPathMatchesCaseInsensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setCaseSensitive(false);
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
  +                     new String[] {});
  +    }
  +
  +    public void test2ButCaseInsesitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"ALPHA/"});
  +        ds.setCaseSensitive(false);
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/beta.xml", 
  +                                       "alpha/beta/gamma/gamma.xml"},
  +                     new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"});
  +    }
  +
       // father and child pattern test
       public void testOrderOfIncludePatternsIrrelevant() {
           String [] expectedFiles = {"alpha/beta/beta.xml", 
  
  
  

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


Mime
View raw message