incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r510656 - /incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
Date Thu, 22 Feb 2007 21:34:46 GMT
Author: maartenc
Date: Thu Feb 22 13:34:46 2007
New Revision: 510656

URL: http://svn.apache.org/viewvc?view=rev&rev=510656
Log:
Added junit test for IVY-390

Modified:
    incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java

Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java?view=diff&rev=510656&r1=510655&r2=510656
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
(original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/URLResolverTest.java
Thu Feb 22 13:34:46 2007
@@ -41,6 +41,7 @@
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.ivy.core.sort.SortEngine;
 import org.apache.ivy.plugins.matcher.ExactPatternMatcher;
+import org.apache.ivy.plugins.version.LatestVersionMatcher;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Delete;
 
@@ -251,6 +252,26 @@
         ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
false), _data);
         assertNotNull(rmr);
         assertEquals("1.4.3", rmr.getId().getRevision());
+    }
+
+    public void testVersionRangeIBiblio() throws Exception {
+        String ibiblioRoot = IBiblioHelper.getIBiblioMirror();
+        if (ibiblioRoot == null) {
+            return;
+        }
+        
+        URLResolver resolver = new URLResolver();
+        resolver.setSettings(_settings);
+        resolver.setAlwaysCheckExactRevision(true);
+        resolver.addIvyPattern(ibiblioRoot+"/[module]/poms/[module]-[revision].pom");
+        resolver.addArtifactPattern(ibiblioRoot+"/[module]/[type]s/[artifact]-[revision].[type]");
+        resolver.setName("test");
+        assertEquals("test", resolver.getName());
+        
+        ModuleRevisionId mrid = ModuleRevisionId.newInstance("asm", "asm", "[1.4,1.5]");
+        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
false), _data);
+        assertNotNull(rmr);
+        assertEquals("1.4.4", rmr.getId().getRevision());
     }
 
     public void testUnknown() throws Exception {



Mime
View raw message