tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1222276 - /tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
Date Thu, 22 Dec 2011 15:20:01 GMT
Author: markt
Date: Thu Dec 22 15:20:00 2011
New Revision: 1222276

URL: http://svn.apache.org/viewvc?rev=1222276&view=rev
Log:
Get test working on Windows

Modified:
    tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java?rev=1222276&r1=1222275&r2=1222276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Thu Dec 22 15:20:00
2011
@@ -165,9 +165,14 @@ public class TestVirtualContext extends 
         // even if there's no such resource
         // assertPageContains("/test/contextGetRealPath.jsp?path=nonexistent",
         // "resourceAInWebInfClasses=true", 404);
+
+        // Real paths depend on the OS and this test has to work on all
+        // platforms so use File to convert the path to a platform specifci form
+        File f = new File(
+            "/test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties");
         assertPageContains(
             "/test/contextGetRealPath.jsp?path=/rsrc/resourceF.properties",
-            "/test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties");
+            f.getPath());
 
         // tests context.getResource then the content
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message