ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r1577740 - in /ant/ivy/core/branches/2.4.x: ./ test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
Date Fri, 14 Mar 2014 22:11:30 GMT
Author: maartenc
Date: Fri Mar 14 22:11:30 2014
New Revision: 1577740

URL: http://svn.apache.org/r1577740
Log:
Fixed testcases on Windows (merged from trunk)

Modified:
    ant/ivy/core/branches/2.4.x/   (props changed)
    ant/ivy/core/branches/2.4.x/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java

Propchange: ant/ivy/core/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /ant/ivy/core/trunk:r1577738

Modified: ant/ivy/core/branches/2.4.x/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.4.x/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java?rev=1577740&r1=1577739&r2=1577740&view=diff
==============================================================================
--- ant/ivy/core/branches/2.4.x/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
(original)
+++ ant/ivy/core/branches/2.4.x/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
Fri Mar 14 22:11:30 2014
@@ -75,10 +75,9 @@ public class URLResolverTest extends Abs
     public void testFile() throws Exception {
         URLResolver resolver = new URLResolver();
         resolver.setSettings(settings);
-        String rootpath = new File("test/repositories/1").getAbsolutePath();
-        resolver.addIvyPattern("file:" + rootpath
-                + "/[organisation]/[module]/ivys/ivy-[revision].xml");
-        resolver.addArtifactPattern("file:" + rootpath
+        String rootpath = new File("test/repositories/1").toURI().toURL().toExternalForm();
+        resolver.addIvyPattern(rootpath + "/[organisation]/[module]/ivys/ivy-[revision].xml");
+        resolver.addArtifactPattern(rootpath
                 + "/[organisation]/[module]/[type]s/[artifact]-[revision].[type]");
         resolver.setName("test");
         assertEquals("test", resolver.getName());
@@ -327,10 +326,9 @@ public class URLResolverTest extends Abs
     public void testDownloadWithUseOriginIsTrue() throws Exception {
         URLResolver resolver = new URLResolver();
         resolver.setSettings(settings);
-        String rootpath = new File("test/repositories/1").getAbsolutePath();
-        resolver.addIvyPattern("file:" + rootpath
-                + "/[organisation]/[module]/ivys/ivy-[revision].xml");
-        resolver.addArtifactPattern("file:" + rootpath
+        String rootpath = new File("test/repositories/1").toURI().toURL().toExternalForm();
+        resolver.addIvyPattern(rootpath + "/[organisation]/[module]/ivys/ivy-[revision].xml");
+        resolver.addArtifactPattern(rootpath
                 + "/[organisation]/[module]/[type]s/[artifact]-[revision].[type]");
         resolver.setName("test");
         ((DefaultRepositoryCacheManager) resolver.getRepositoryCacheManager()).setUseOrigin(true);



Mime
View raw message