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/util FileUtilsTest.java
Date Fri, 11 Jul 2003 14:53:05 GMT
antoine     2003/07/11 07:53:05

  Modified:    src/testcases/org/apache/tools/ant/util FileUtilsTest.java
  Log:
  Allow FileUtilsTest to run on DOS/Windows when current drive letter is not C:
  PR: 21383
  Submitted by: Brad Clarke ( bclarke at booksys dot com)
  
  Revision  Changes    Path
  1.20      +2 -8      ant/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java
  
  Index: FileUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/util/FileUtilsTest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FileUtilsTest.java	28 Jun 2003 14:18:40 -0000	1.19
  +++ FileUtilsTest.java	11 Jul 2003 14:53:05 -0000	1.20
  @@ -429,20 +429,14 @@
       public void testToURI() {
           String dosRoot = null;
           if (Os.isFamily("dos")) {
  -            dosRoot = "C:/";
  +            dosRoot = System.getProperty("user.dir").charAt(0) + ":/";
           }
           else
           {
               dosRoot = "";
           }
           if (Os.isFamily("dos")) {
  -            assertEquals("file:///"+ dosRoot + "foo", fu.toURI("c:\\foo"));
  -        }
  -        if (Os.isFamily("dos")) {
  -            // this amounts to : are we under cygwin ?
  -            if (Character.isLowerCase(System.getProperty("user.dir").charAt(0))) {
  -                dosRoot = "c:/";
  -            }
  +            assertEquals("file:///C:/foo", fu.toURI("c:\\foo"));
           }
           assertEquals("file:///" + dosRoot + "foo", fu.toURI("/foo"));
           assertEquals("file:./foo",  fu.toURI("./foo"));
  
  
  

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


Mime
View raw message