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

Modified Paths:
--------------
    
branches/vexi4c/org.vexi-core.main/src/test/java/test/core/linenumbering/TestLineNumbering.java

Modified: 
branches/vexi4c/org.vexi-core.main/src/test/java/test/core/linenumbering/TestLineNumbering.java
===================================================================
--- 
branches/vexi4c/org.vexi-core.main/src/test/java/test/core/linenumbering/TestLineNumbering.java
     2013-12-21 21:55:28 UTC (rev 4627)
+++ 
branches/vexi4c/org.vexi-core.main/src/test/java/test/core/linenumbering/TestLineNumbering.java
     2013-12-22 00:30:47 UTC (rev 4628)
@@ -7,6 +7,7 @@
 import java.io.FileOutputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
+import java.net.URISyntaxException;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -34,20 +35,25 @@
     public TestLineNumbering() {
                super(TestLineNumbering.class);
                
-               File resourceDir = new 
File(TestLineNumbering.class.getResource(".").getPath());
+               File resourceDir = null;
+               try {
+                       resourceDir = new 
File(TestLineNumbering.class.getResource(".").toURI().getSchemeSpecificPart());
+               } catch (URISyntaxException e) {
+                       e.printStackTrace();
+               }
                tempDir = Util.createTmpDir(TestLineNumbering.class);
                
                File[] toPreprocess = resourceDir.listFiles();
-               for(int i=0; i<toPreprocess.length; i++)
-               try{
-                       preprocessFile(toPreprocess[i], tempDir);
-               }catch(final Exception e){
-                       addTest(new TestCase(){
-                               protected void runTest() throws Throwable {
-                                       fail(e.getMessage());
-                               }
-                       });
-               }
+               for (int i=0; i<toPreprocess.length; i++)
+                       try {
+                               preprocessFile(toPreprocess[i], tempDir);
+                       } catch(final Exception e) {
+                               addTest(new TestCase() {
+                                       protected void runTest() throws 
Throwable {
+                                               fail(e.getMessage());
+                                       }
+                               });
+                       }
        }
     
        public static Test 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