You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/12/22 16:20:01 UTC
svn commit: r1222276 -
/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
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
Re: svn commit: r1222276 - /tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
Posted by Mark Thomas <ma...@apache.org>.
On 22/12/2011 15:49, Konstantin Kolinko wrote:
> 2011/12/22 <ma...@apache.org>:
>> 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");
>
> I think that you wouldn't want a filesystem path starting with "/" above.
It works on Windows :)
Fix on the way.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1222276 - /tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/12/22 <ma...@apache.org>:
> 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");
I think that you wouldn't want a filesystem path starting with "/" above.
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org