ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java
Date Sat, 19 Jul 2003 15:57:21 GMT
antoine     2003/07/19 08:57:21

  Modified:    src/testcases/org/apache/tools/ant DirectoryScannerTest.java
  Log:
  make the new tests involving case sensitivity or not pass on Windows
  
  Revision  Changes    Path
  1.16      +19 -4     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DirectoryScannerTest.java	16 Jul 2003 13:34:14 -0000	1.15
  +++ DirectoryScannerTest.java	19 Jul 2003 15:57:21 -0000	1.16
  @@ -120,7 +120,11 @@
           ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
           ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
           ds.scan();
  -        compareFiles(ds, new String[] {}, new String[] {});
  +        if (Os.isFamily("dos")) {
  +            compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"}, new String[]
{});
  +        } else {
  +            compareFiles(ds, new String[] {}, new String[] {});
  +        }
       }
   
       public void testFullPathMatchesCaseInsensitive() {
  @@ -129,8 +133,13 @@
           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[] {});
  +        if (Os.isFamily("dos")) {
  +            compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"},
  +                         new String[] {});
  +        } else {
  +            compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
  +                         new String[] {});
  +        }
       }
   
       public void test2ButCaseInsesitive() {
  @@ -139,9 +148,15 @@
           ds.setIncludes(new String[] {"ALPHA/"});
           ds.setCaseSensitive(false);
           ds.scan();
  -        compareFiles(ds, new String[] {"alpha/beta/beta.xml", 
  +        if (Os.isFamily("dos")) {
  +            compareFiles(ds, new String[] {"ALPHA/beta/beta.xml",
  +                                           "ALPHA/beta/gamma/gamma.xml"},
  +                         new String[] {"ALPHA", "ALPHA/beta", "ALPHA/beta/gamma"});
  +        }  else {
  +        compareFiles(ds, new String[] {"alpha/beta/beta.xml",
                                          "alpha/beta/gamma/gamma.xml"},
                        new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"});
  +        }
       }
   
       public void testAllowSymlinks() {
  
  
  

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


Mime
View raw message