Revision: 4629
          http://sourceforge.net/p/vexi/code/4629
Author:   clrg
Date:     2013-12-22 00:30:55 +0000 (Sun, 22 Dec 2013)
Log Message:
-----------
Fix tests for paths with spaces on Windows

Modified Paths:
--------------
    branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java

Modified: 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java
===================================================================
--- 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java    
    2013-12-22 00:30:47 UTC (rev 4628)
+++ 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java    
    2013-12-22 00:30:55 UTC (rev 4629)
@@ -4,6 +4,7 @@
 import java.io.FilenameFilter;
 import java.lang.reflect.Method;
 import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
@@ -85,10 +86,16 @@
        
        
        static public TestSuite buildScriptSuite(Object obj){
-               String packige = obj.getClass().getPackage().getName();
+               String packageName = obj.getClass().getPackage().getName();
                TestSuite suite = (obj instanceof TestSuite)? (TestSuite)obj: 
JUnitUtil.newTestSuite((obj.getClass())); 
-               //String packige, TestSuite suite, File dir){
-               buildTestSuite(packige, suite, new 
File(obj.getClass().getResource(".").getPath()));
+               //String packageName, TestSuite suite, File dir) {
+               try {
+                       String path = 
obj.getClass().getResource(".").toURI().getSchemeSpecificPart();
+                       buildTestSuite(packageName, suite,
+                                       new File(path));
+               } catch (URISyntaxException e) {
+                       e.printStackTrace();
+               }
                return suite;
        }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to