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, 23 Jul 2003 07:13:39 GMT
bodewig     2003/07/23 00:13:39

  Modified:    src/testcases/org/apache/tools/ant DirectoryScannerTest.java
  Log:
  More problems with case sensitivity
  
  Revision  Changes    Path
  1.19      +46 -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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DirectoryScannerTest.java	22 Jul 2003 12:34:56 -0000	1.18
  +++ DirectoryScannerTest.java	23 Jul 2003 07:13:39 -0000	1.19
  @@ -190,6 +190,52 @@
           compareFiles(ds, expectedFiles, expectedDirectories);
       }
   
  +    public void testPatternsDifferInCaseScanningSensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"alpha/", "ALPHA/"});
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/beta.xml", 
  +                                       "alpha/beta/gamma/gamma.xml"},
  +                     new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"});
  +    }
  +
  +    public void testPatternsDifferInCaseScanningInsensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {"alpha/", "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"});
  +    }
  +
  +    public void testFullpathDiffersInCaseScanningSensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {
  +            "alpha/beta/gamma/gamma.xml",
  +            "alpha/beta/gamma/GAMMA.XML"
  +        });
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
  +                     new String[] {});
  +    }
  +
  +    public void testFullpathDiffersInCaseScanningInsensitive() {
  +        DirectoryScanner ds = new DirectoryScanner();
  +        ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
  +        ds.setIncludes(new String[] {
  +            "alpha/beta/gamma/gamma.XML",
  +            "alpha/beta/gamma/GAMMA.XML"
  +        });
  +        ds.setCaseSensitive(false);
  +        ds.scan();
  +        compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
  +                     new String[] {});
  +    }
  +
       /**
        * Test case for setFollowLinks() and associated funtionality.
        * Only supports test on linux, at the moment because Java has
  
  
  

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


Mime
View raw message