Browse Source

preserve case on Cygwin when using 1.4 toURI

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@359270 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
70201309a9
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      src/testcases/org/apache/tools/ant/util/FileUtilsTest.java

+ 11
- 2
src/testcases/org/apache/tools/ant/util/FileUtilsTest.java View File

@@ -444,8 +444,17 @@ public class FileUtilsTest extends TestCase {
public void testToURI() {
String dosRoot = null;
if (Os.isFamily("dos") || Os.isFamily("netware")) {
dosRoot = Character.toUpperCase(
System.getProperty("user.dir").charAt(0)) + ":/";
dosRoot = System.getProperty("user.dir")
.substring(0, 3).replace(File.separatorChar, '/');

//preserve case on Cygwin when using 1.4 toURI:
Class uriClazz = null;
try {
uriClazz = Class.forName("java.net.URI");
} catch (ClassNotFoundException e) {
// OK, Java 1.3.
dosRoot = dosRoot.toUpperCase();
}
}
else
{


Loading…
Cancel
Save