Author: markt
Date: Sun Mar 7 11:27:20 2010
New Revision: 919968
URL: http://svn.apache.org/viewvc?rev=919968&view=rev
Log:
Check all versions are correctly parsed
Modified:
tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java
Modified: tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java?rev=919968&r1=919967&r2=919968&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java (original)
+++ tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java Sun Mar 7
11:27:20 2010
@@ -71,7 +71,37 @@
assertEquals(500, webxml.getMinorVersion());
}
- public void testParsePublicIdVersion() {
+ public void testParsePublicIdVersion22() {
+
+ WebXml webxml = new WebXml();
+
+ webxml.setPublicId(
+ org.apache.catalina.startup.Constants.WebDtdPublicId_22);
+ assertEquals(2, webxml.getMajorVersion());
+ assertEquals(2, webxml.getMinorVersion());
+ }
+
+ public void testParsePublicIdVersion23() {
+
+ WebXml webxml = new WebXml();
+
+ webxml.setPublicId(
+ org.apache.catalina.startup.Constants.WebDtdPublicId_23);
+ assertEquals(2, webxml.getMajorVersion());
+ assertEquals(3, webxml.getMinorVersion());
+ }
+
+ public void testParsePublicIdVersion24() {
+
+ WebXml webxml = new WebXml();
+
+ webxml.setPublicId(
+ org.apache.catalina.startup.Constants.WebSchemaPublicId_24);
+ assertEquals(2, webxml.getMajorVersion());
+ assertEquals(4, webxml.getMinorVersion());
+ }
+
+ public void testParsePublicIdVersion25() {
WebXml webxml = new WebXml();
@@ -80,4 +110,14 @@
assertEquals(2, webxml.getMajorVersion());
assertEquals(5, webxml.getMinorVersion());
}
+
+ public void testParsePublicIdVersion30() {
+
+ WebXml webxml = new WebXml();
+
+ webxml.setPublicId(
+ org.apache.catalina.startup.Constants.WebSchemaPublicId_30);
+ assertEquals(3, webxml.getMajorVersion());
+ assertEquals(0, webxml.getMinorVersion());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]