You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2007/03/29 02:13:25 UTC
svn commit: r523513 -
/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java
Author: joerg
Date: Wed Mar 28 17:13:24 2007
New Revision: 523513
URL: http://svn.apache.org/viewvc?view=rev&rev=523513
Log:
work around for OS specific source resolving
Modified:
cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java
Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java?view=diff&rev=523513&r1=523512&r2=523513
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java (original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/components/source/impl/ZipSourceTestCase.java Wed Mar 28 17:13:24 2007
@@ -25,7 +25,17 @@
assertTrue("Resolved Source is not an instance of ZipSource.",
zipSource instanceof ZipSource);
assertEquals("Scheme/protocol is wrong.", "zip", zipSource.getScheme());
- assertEquals("Uri is wrong.", zipSourceUri, zipSource.getURI());
+ String actualZipSourceUri = zipSource.getURI();
+ int index = actualZipSourceUri.indexOf("file://");
+ if (index != -1) {
+ assertEquals("Uri is wrong.", zipSourceUri, actualZipSourceUri);
+ } else {
+ // FIXME: special treatment for OS specific return value, should be
+ // removed after an update of Excalibur source resolve
+ // - https://issues.apache.org/jira/browse/COCOON-2022
+ // - http://thread.gmane.org/gmane.comp.apache.excalibur.devel/2107
+ assertEquals("Uri is wrong.", zipSourceUri.substring(0, index + 6).concat(zipSourceUri.substring(index + 7)), actualZipSourceUri);
+ }
}
}