Bug 515476: Test schemaless Web DDs Also-by: Brian de Alwis <bsd@mt.ca> Signed-off-by: John Collier <John.J.Collier@ibm.com>
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web24min.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web24min.xml new file mode 100644 index 0000000..ef787bc --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web24min.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"> + <display-name> + EAR14Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web25min.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web25min.xml new file mode 100644 index 0000000..33b1dab --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web25min.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30.xml new file mode 100644 index 0000000..bb3db82 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30min.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30min.xml new file mode 100644 index 0000000..d54fcb1 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web30min.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31.xml new file mode 100644 index 0000000..453d6c7 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31min.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31min.xml new file mode 100644 index 0000000..fbd43bc --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web31min.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40.xml new file mode 100644 index 0000000..6379150 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40min.xml b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40min.xml new file mode 100644 index 0000000..2d463d7 --- /dev/null +++ b/tests/org.eclipse.jst.j2ee.tests/TestData/headerParserTestData/web40min.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee"> + <display-name> + EAR5Web</display-name> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file
diff --git a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/j2ee/operations/HeaderParserTests.java b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/j2ee/operations/HeaderParserTests.java index b3eacc3..eaf4e0c 100644 --- a/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/j2ee/operations/HeaderParserTests.java +++ b/tests/org.eclipse.jst.j2ee.tests/j2ee-tests/org/eclipse/wtp/j2ee/headless/tests/j2ee/operations/HeaderParserTests.java
@@ -186,7 +186,17 @@ data.add(new TestData("web23.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_3_ID, J2EEVersionConstants.J2EE_1_3_ID)); data.add(new TestData("web24.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_4_ID, J2EEVersionConstants.J2EE_1_4_ID)); data.add(new TestData("web25.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_5_ID, J2EEVersionConstants.JEE_5_0_ID)); - + data.add(new TestData("web30.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_3_0_ID, J2EEVersionConstants.JEE_6_0_ID)); + data.add(new TestData("web31.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_3_1_ID, J2EEVersionConstants.JEE_7_0_ID)); + data.add(new TestData("web40.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_4_0_ID, J2EEVersionConstants.JEE_8_0_ID)); + + // Test the Web-App DDs without the schema specified + data.add(new TestData("web24min.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_4_ID, J2EEVersionConstants.J2EE_1_4_ID)); + data.add(new TestData("web25min.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_2_5_ID, J2EEVersionConstants.JEE_5_0_ID)); + data.add(new TestData("web30min.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_3_0_ID, J2EEVersionConstants.JEE_6_0_ID)); + data.add(new TestData("web31min.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_3_1_ID, J2EEVersionConstants.JEE_7_0_ID)); + data.add(new TestData("web40min.xml", J2EEVersionConstants.WEB_TYPE, J2EEVersionConstants.WEB_4_0_ID, J2EEVersionConstants.JEE_8_0_ID)); + // test some bogus dds as well data.add(new TestData("notxml.xml", J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN)); data.add(new TestData("notjavaee.xml", J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN, J2EEVersionConstants.UNKNOWN));