From: <otm...@us...> - 2009-05-05 21:02:58
|
Revision: 6299 http://jython.svn.sourceforge.net/jython/?rev=6299&view=rev Author: otmarhumbel Date: 2009-05-05 21:02:49 +0000 (Tue, 05 May 2009) Log Message: ----------- properly decode the URL, making these tests pass in hudson's jython all workspace Modified Paths: -------------- trunk/jython/tests/java/org/python/core/PySystemState_registry_Test.java Modified: trunk/jython/tests/java/org/python/core/PySystemState_registry_Test.java =================================================================== --- trunk/jython/tests/java/org/python/core/PySystemState_registry_Test.java 2009-05-05 19:28:24 UTC (rev 6298) +++ trunk/jython/tests/java/org/python/core/PySystemState_registry_Test.java 2009-05-05 21:02:49 UTC (rev 6299) @@ -6,6 +6,7 @@ import java.io.IOException; import java.lang.reflect.Field; import java.net.URL; +import java.net.URLDecoder; import java.util.Properties; import junit.framework.TestCase; @@ -161,13 +162,14 @@ /** * determine the installation root (the /dist directory) + * @throws Exception */ - private void findRoot() { + private void findRoot() throws Exception { Class<? extends PySystemState_registry_Test> thisClass = getClass(); String classFileName = "/".concat(thisClass.getName().replace('.', '/')).concat(".class"); URL url = thisClass.getResource(classFileName); assertNotNull(url); - String path = url.getPath(); + String path = URLDecoder.decode(url.getPath(), "UTF-8"); assertTrue(path.endsWith(classFileName)); String classesDirName = path.substring(0, path.length() - classFileName.length()); File classesDir = new File(classesDirName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |