diff --git a/glassfish-runner/jstl-tck/j2ee.pass b/glassfish-runner/jstl-tck/j2ee.pass new file mode 100644 index 0000000000..dccc3037eb --- /dev/null +++ b/glassfish-runner/jstl-tck/j2ee.pass @@ -0,0 +1,17 @@ + +# +# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# +AS_ADMIN_USERPASSWORD=j2ee diff --git a/glassfish-runner/jstl-tck/javajoe.pass b/glassfish-runner/jstl-tck/javajoe.pass new file mode 100644 index 0000000000..d69a7520e5 --- /dev/null +++ b/glassfish-runner/jstl-tck/javajoe.pass @@ -0,0 +1,16 @@ +# +# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# +AS_ADMIN_USERPASSWORD=javajoe diff --git a/glassfish-runner/jstl-tck/pom.xml b/glassfish-runner/jstl-tck/pom.xml new file mode 100644 index 0000000000..5fddfdc2e0 --- /dev/null +++ b/glassfish-runner/jstl-tck/pom.xml @@ -0,0 +1,478 @@ + + + + 4.0.0 + + + org.glassfish + standalone-tck + 10.0.0-SNAPSHOT + ../pom.xml + + jakarta + glassfish.jstl-tck + 10.0.0-SNAPSHOT + jar + + + ; + derby + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + 8.0.0-M5 + glassfish8 + 11.0.0-M2 + ${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyclient.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyshared.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbytools.jar + derby + org.apache.derby.jdbc.ClientDriver + derbyDB + cts1 + 1527 + localhost + jdbc:derby://${jstl.db.server}:${jstl.db.port}/${jstl.db.name};create=true + cts1 + 5.9.1 + jstl-tck + 4.0.0 + + + + + org.junit.vintage + junit-vintage-engine + test + + + jakarta.tck + jstl-tck + 11.0.0-SNAPSHOT + + + org.glassfish.main.common + simple-glassfish-api + ${glassfish.container.version} + + + org.jboss.arquillian.junit5 + arquillian-junit5-container + 1.7.0.Alpha10 + + + jakarta.platform + jakarta.jakartaee-api + ${jakarta.platform.version} + provided + + + commons-httpclient + commons-httpclient + 3.1 + + + org.glassfish.hk2 + hk2-locator + 3.0.0 + + + org.jboss.arquillian.container + arquillian-container-test-spi + 1.7.0.Alpha10 + + + org.omnifaces.arquillian + arquillian-glassfish-server-managed + 1.2 + test + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + download-gf + + unpack + + pre-integration-test + + + + org.glassfish.main.distributions + ${glassfish-artifact-id} + ${glassfish.container.version} + zip + true + ${project.build.directory} + + + + + + + + maven-antrun-plugin + 3.0.0 + + + + run + + pre-integration-test + + + + + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + 1-StopDomain + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + stop-domain + + + + + 2-StartDomain + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + start-domain + + + + + 3-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalStylesheet=all + + + + + 4-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalDTD=file,http + + + + + 5-create-jvm-options + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + create-jvm-options + -Djavax.xml.accessExternalSchema=all + + + 0 + 1 + + + + + 6-EnableTraceRequests + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + set + server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true + + + + + 7-DeleteUser-j2ee + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + --passwordfile + ${project.basedir}/j2ee.pass + delete-file-user + j2ee + + + 0 + 1 + + + + + 8-AddUser-j2ee + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + --passwordfile + ${project.basedir}/j2ee.pass + create-file-user + --groups + staff:mgr + j2ee + + + + + 9-DeleteUser-javajoe + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + --passwordfile + ${project.basedir}/javajoe.pass + delete-file-user + javajoe + + + 0 + 1 + + + + + A-AddUser-javajoe + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + --passwordfile + ${project.basedir}/javajoe.pass + create-file-user + --groups + guest + javajoe + + + + + B-list-users + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + list-file-users + + + + + C-StopDomain + + exec + + pre-integration-test + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin + + stop-domain + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + stop-database + + exec + + pre-integration-test + + ${exec.asadmin} + + stop-database + + + 0 + 1 + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + start-database + + exec + + pre-integration-test + + ${exec.asadmin} + + start-database + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 3.0.0 + + + initdb + + run + + pre-integration-test + + + + + + + + + + + + + maven-failsafe-plugin + 3.0.0-M5 + + + gf-tests + + integration-test + verify + + + + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet-api.jar + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.el-api.jar + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp-api.jar + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl-api.jar + + jakartatck:jstl-tck + + ${project.build.directory}/${glassfish.toplevel.dir} + ${project.build.directory}/${glassfish.toplevel.dir} + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish + glassfish + ${webServerHome}/domains/domain1/autodeploy + 30 + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet-api.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp-api.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.el-api.jar + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl-api.jar + true + derbyDB + localhost + 1527 + jdbc:derby://${jstl.db.server}:${jstl.db.port}/${jstl.db.name};create=true + org.apache.derby.jdbc.ClientDriver + cts1 + cts1 + j2ee + j2ee + javajoe + javajoe + true + true + com.sun.ts.tests.jstl.lib.implementation.sun.common.SunRIURL + + + ${project.build.directory}/${glassfish.toplevel.dir} + + + + + + + + + + + full + + true + + + glassfish + + + + web + + web + + + + diff --git a/glassfish-runner/jstl-tck/sql/derby/derby.ddl.jstl.sql b/glassfish-runner/jstl-tck/sql/derby/derby.ddl.jstl.sql new file mode 100644 index 0000000000..2ee0302673 --- /dev/null +++ b/glassfish-runner/jstl-tck/sql/derby/derby.ddl.jstl.sql @@ -0,0 +1,24 @@ +drop table jstl_tab1 ; +create table jstl_tab1(idNum INT NOT NULL, firstName VARCHAR(20) NOT NULL, lastName VARCHAR(20) NOT NULL, primary key(idNum)) ; + +drop table jstl_tab2 ; +create table jstl_tab2(idNum INT NOT NULL, dob DATE NOT NULL, firstName VARCHAR(20) NOT NULL, lastName VARCHAR(20) NOT NULL, rank INT NOT NULL, rating NUMERIC(10,2)) ; + +drop table jstl_tab3 ; +create table jstl_tab3(idNum INTEGER NOT NULL, aDate DATE, aTime TIME, aTimestamp TIMESTAMP) ; + + +INSERT INTO jstl_tab1 VALUES(1, 'Lance', 'Andersen') ; +INSERT INTO jstl_tab1 VALUES(2, 'Ryan', 'Lubke') ; +INSERT INTO jstl_tab1 VALUES(3, 'Sandra', 'Roberts') ; +INSERT INTO jstl_tab1 VALUES(4, 'Hong', 'Zhang') ; +INSERT INTO jstl_tab1 VALUES(5, 'Raja', 'Perumal') ; +INSERT INTO jstl_tab1 VALUES(6, 'Shelly', 'McGowan') ; +INSERT INTO jstl_tab1 VALUES(7, 'Ryan', 'O''Connell') ; +INSERT INTO jstl_tab1 VALUES(8, 'Tonya', 'Andersen') ; +INSERT INTO jstl_tab1 VALUES(9, 'Eric', 'Jendrock') ; +INSERT INTO jstl_tab1 VALUES(10, 'Carla', 'Mott') ; +INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1999-05-05'}, 'Lance', 'Andersen', 1, 4.25) ; +INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (99, {d '1999-05-05'}, 'Courtney', 'Andersen', 1, NULL) ; +INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) ; +INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(2, NULL, NULL, NULL) ; diff --git a/glassfish-runner/jstl-tck/sql/derby/derby.dml.jstl.sql b/glassfish-runner/jstl-tck/sql/derby/derby.dml.jstl.sql new file mode 100644 index 0000000000..070d7fdfae --- /dev/null +++ b/glassfish-runner/jstl-tck/sql/derby/derby.dml.jstl.sql @@ -0,0 +1,35 @@ +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/glassfish-runner/jstl-tck/src/test/resources/arquillian.xml b/glassfish-runner/jstl-tck/src/test/resources/arquillian.xml new file mode 100644 index 0000000000..c7b9520871 --- /dev/null +++ b/glassfish-runner/jstl-tck/src/test/resources/arquillian.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + target/glassfish8 + + + + + diff --git a/jstl/pom.xml b/jstl/pom.xml index 4938f9cd55..f32733999f 100644 --- a/jstl/pom.xml +++ b/jstl/pom.xml @@ -1,7 +1,7 @@ diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java index 5b426980fd..ef6ed3577b 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,14 +20,113 @@ package com.sun.ts.tests.jstl.common.client; +import static org.junit.jupiter.api.Assertions.assertFalse; + +import java.io.InputStream; +import java.lang.System.Logger; +import java.net.URL; + +import com.sun.ts.tests.jstl.common.tags.TestTag; +import com.sun.ts.tests.jstl.common.resources.Resources_en; + +import org.jboss.arquillian.container.test.api.OperateOnDeployment; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.UrlAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.TestInfo; + import com.sun.ts.tests.common.webclient.BaseUrlClient; import com.sun.ts.tests.common.webclient.WebTestCase; import com.sun.ts.tests.common.webclient.http.HttpRequest; public class AbstractUrlClient extends BaseUrlClient { + private static final Logger logger = System.getLogger(AbstractUrlClient.class.getName()); + + @BeforeEach + void logStartTest(TestInfo testInfo) { + logger.log(Logger.Level.INFO, "STARTING TEST : "+testInfo.getDisplayName()); + } + + @AfterEach + void logFinishTest(TestInfo testInfo) { + logger.log(Logger.Level.INFO, "FINISHED TEST : "+testInfo.getDisplayName()); + } + + @ArquillianResource + @OperateOnDeployment("_DEFAULT_") + public URL url; + + + protected InputStream goldenFileStream = null; + + public InputStream getGoldenFileStream() { + return goldenFileStream; + } + + public void setGoldenFileStream(InputStream gfStream) { + goldenFileStream = gfStream; + } + protected static final String STANDARD_COMPAT = "standardCompat"; + + private void setGoldenFileStreamProperty(WebTestCase testCase, InputStream gfStream) { + testCase.setGoldenFileStream(gfStream); + } + + protected boolean isNullOrEmpty(String val) { + if (val == null || val.equals("")) { + return true; + } + return false; + } + + protected static JavaArchive getCommonJarArchive() { + String packagePathTags = TestTag.class.getPackageName().replace(".", "/"); + String packagePathResources = Resources_en.class.getPackageName().replace(".", "/"); + + JavaArchive jstlTCKCommonJar = ShrinkWrap.create(JavaArchive.class, "jstltck-common.jar"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/jstltck-util.tld")), "META-INF/jstltck-util.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/permitted.tld")), "META-INF/permitted.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nodecl.tld")), "META-INF/scrfree_nodecl.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noexpr.tld")), "META-INF/scrfree_noexpr.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_nortexpr.tld")), "META-INF/scrfree_nortexpr.tld"); + jstlTCKCommonJar.addAsResource(new UrlAsset(TestTag.class.getClassLoader().getResource(packagePathTags+"/tlds/scrfree_noscr.tld")), "META-INF/scrfree_noscr.tld"); + + jstlTCKCommonJar.addPackages(true,"com.sun.ts.tests.jstl.common"); + + jstlTCKCommonJar.add(new UrlAsset(Resources_en.class.getClassLoader().getResource(packagePathResources+"/AlgoResources_en_IE_EURO.properties")), packagePathResources+"/AlgoResources_en_IE_EURO.properties"); + jstlTCKCommonJar.add(new UrlAsset(Resources_en.class.getClassLoader().getResource(packagePathResources+"/AlgoResources.properties")), packagePathResources+"/AlgoResources.properties"); + + return jstlTCKCommonJar; + } + + @BeforeEach + public void setup() throws Exception { + + logger.log(Logger.Level.INFO, "setup method AbstractUrlClient"); + + if (url == null){ + throw new Exception( + "[AbstractUrlClient] The url was not injected"); + } + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[AbstractUrlClient] 'webServerHost' was not set in the properties."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[AbstractUrlClient] 'webServerPort' was not set in the properties."); + _port = Integer.parseInt(portnum.trim()); + + logger.log(Logger.Level.INFO, "[AbstractUrlClient] Test setup OK"); + } + + /** * Sets the test properties for this testCase. * @@ -47,14 +146,8 @@ protected void setTestProperties(WebTestCase testCase) { HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); testCase.setRequest(req); } - String gf = TEST_PROPS.getProperty(GOLDENFILE); - if (gf != null) { - StringBuffer sb = new StringBuffer(25); - sb.append(_tsHome).append("/src/web").append(GOLDENFILEDIR); - sb.append(SL).append(gf); - testCase.setGoldenFilePath(sb.toString()); - TEST_PROPS.remove(GOLDENFILE); - } + + setGoldenFileStreamProperty(testCase, goldenFileStream); } super.setTestProperties(testCase); @@ -102,12 +195,6 @@ private void setStandardProperties(String testValue, WebTestCase testCase) { HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); testCase.setRequest(req); - // set the goldenfile - sb = new StringBuffer(50); - sb.append(_tsHome).append("/src/web").append(GOLDENFILEDIR); - sb.append(SL); - sb.append(testValue).append(GF_SUFFIX); - testCase.setGoldenFilePath(sb.toString()); } /** @@ -143,11 +230,5 @@ private void setStandardCompatProperties(String testValue, HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); testCase.setRequest(req); - // set the goldenfile - sb = new StringBuffer(50); - sb.append(_tsHome).append(GOLDENFILEDIR); - sb.append(_generalURI).append(SL); - sb.append(testValue).append(GF_SUFFIX); - testCase.setGoldenFilePath(sb.toString()); } } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java index 3f8eaff33b..811ea296c9 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java @@ -20,29 +20,37 @@ package com.sun.ts.tests.jstl.common.client; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.Enumeration; import java.util.Properties; -import com.sun.ts.tests.common.webclient.BaseUrlClient; +import org.junit.jupiter.api.BeforeEach; + import com.sun.ts.tests.common.webclient.WebTestCase; import com.sun.ts.tests.common.webclient.http.HttpRequest; import com.sun.ts.tests.jstl.common.JstlTckConstants; -public class CompatAbstractUrlClient extends BaseUrlClient +public class CompatAbstractUrlClient extends AbstractUrlClient implements JstlTckConstants { protected Properties dbArgs = new Properties(); protected static final String STANDARD_COMPAT = "standardCompat"; - public void setup(String[] args, Properties p) throws Exception { + @BeforeEach + @Override + public void setup() throws Exception { for (int i = 0; i < JSTL_DB_PROPS.length; i++) { - String s = p.getProperty(JSTL_DB_PROPS[i]); + String s = System.getProperty(JSTL_DB_PROPS[i]); + assertTrue(!isNullOrEmpty(s), + "[CompatAbstractUrlClient] '"+JSTL_DB_PROPS[i]+"' was not set."); if (s != null) { dbArgs.setProperty(JSTL_DB_PROPS[i], s.trim()); } } - super.setup(args, p); + super.setup(); + } /** @@ -51,6 +59,7 @@ public void setup(String[] args, Properties p) throws Exception { * @param testCase * - the current test case */ + @Override protected void setTestProperties(WebTestCase testCase) { setStandardProperties(TEST_PROPS.getProperty(STANDARD_COMPAT), testCase); if (testCase.getRequest() == null) { @@ -74,16 +83,6 @@ protected void setTestProperties(WebTestCase testCase) { } } - /** - * Sets the goldenfile directory - * - * @param goldenDir - * goldenfile directory based off test directory - */ - public void setGoldenFileDir(String goldenDir) { - GOLDENFILEDIR = goldenDir; - } - /** * Consists of a test name, a request, and a goldenfile. * @@ -116,12 +115,6 @@ private void setStandardProperties(String testValue, WebTestCase testCase) { HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); testCase.setRequest(req); - // set the goldenfile - sb = new StringBuffer(50); - sb.append(_tsHome).append(GOLDENFILEDIR); - sb.append(_generalURI).append(SL); - sb.append(testValue).append(GF_SUFFIX); - testCase.setGoldenFilePath(sb.toString()); } } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java index 802f9bf572..b127187955 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java @@ -20,9 +20,13 @@ package com.sun.ts.tests.jstl.common.client; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.Enumeration; import java.util.Properties; +import org.junit.jupiter.api.BeforeEach; + import com.sun.ts.tests.common.webclient.WebTestCase; import com.sun.ts.tests.common.webclient.http.HttpRequest; import com.sun.ts.tests.jstl.common.JstlTckConstants; @@ -31,15 +35,18 @@ public class SqlUrlClient extends AbstractUrlClient implements JstlTckConstants { protected Properties dbArgs = new Properties(); + @BeforeEach @Override - public void setup(String[] args, Properties p) throws Exception { + public void setup() throws Exception { for (int i = 0; i < JSTL_DB_PROPS.length; i++) { - String s = p.getProperty(JSTL_DB_PROPS[i]); + String s = System.getProperty(JSTL_DB_PROPS[i]); + assertTrue(!isNullOrEmpty(s), + "[SqlUrlClient] '"+JSTL_DB_PROPS[i]+"' was not set."); if (s != null) { dbArgs.setProperty(JSTL_DB_PROPS[i], s.trim()); } } - super.setup(args, p); + super.setup(); } @Override diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java similarity index 64% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java index 363bbb3c8d..736ebf1165 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java @@ -14,56 +14,90 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * @(#)JSTLClient.java 1.2 03/19/02 - */ - package com.sun.ts.tests.jstl.compat.onedotzero; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.CompatAbstractUrlClient; -public class JSTLClient extends CompatAbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends CompatAbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setGeneralURI("/jstl/compat/onedotzero"); + setContextRoot("/jstl_1_0_compat_web"); } - /* - * public methods - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_1_0_compat_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_1_0_compat_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.jsp")), "import.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.txt")), "import.txt"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeScriptFreeTlvNoDeclTest.jsp")), "negativeScriptFreeTlvNoDeclTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/param.xsl")), "param.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleLocalizationScopeTest.jsp")), "positiveBundleLocalizationScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCatchVarTest.jsp")), "positiveCatchVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCWOTest.jsp")), "positiveCWOTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamQueryTimestampTest.jsp")), "positiveDateParamQueryTimestampTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDefaultEncodingTest.jsp")), "positiveDefaultEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDValueTest.jsp")), "positiveFDValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNScopeTest.jsp")), "positiveFNScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFormatLocalizationContextI18NTest.jsp")), "positiveFormatLocalizationContextI18NTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForTokensTest.jsp")), "positiveForTokensTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfScopeTest.jsp")), "positiveIfScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportAbsUrlTest.jsp")), "positiveImportAbsUrlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsObjArrayTest.jsp")), "positiveItemsObjArrayTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveJSTLURITest.jsp")), "positiveJSTLURITest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyTest.jsp")), "positiveMessageKeyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutEscXmlTest.jsp")), "positiveOutEscXmlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamNameValueTest.jsp")), "positiveParamNameValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamValueTest.jsp")), "positiveParamValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseVarTest.jsp")), "positiveParseVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDValueTest.jsp")), "positivePDValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePermittedTlvTest.jsp")), "positivePermittedTlvTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNValueTest.jsp")), "positivePNValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryScopeAttributeTest.jsp")), "positiveQueryScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRedirectTest.jsp")), "positiveRedirectTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRemoveScopeVarTest.jsp")), "positiveRemoveScopeVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsCountTest.jsp")), "positiveResultGetRowsCountTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleScopeVarTest.jsp")), "positiveSetBundleScopeVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceScopeAttributeTest.jsp")), "positiveSetDataSourceScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleValueTest.jsp")), "positiveSetLocaleValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetScopeTest.jsp")), "positiveSetScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetSelectVarTest.jsp")), "positiveSetSelectVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneValueTest.jsp")), "positiveSetTimezoneValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTimezoneValueTest.jsp")), "positiveTimezoneValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformVarTest.jsp")), "positiveTransformVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxQueryCommitTest.jsp")), "positiveTxQueryCommitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateBodyContentTest.jsp")), "positiveUpdateBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlScopeTest.jsp")), "positiveUrlScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXParamNameTest.jsp")), "positiveXParamNameTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple2.xml")), "simple2.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple2.xsl")), "simple2.xsl"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setGeneralURI("/jstl/compat/onedotzero"); - setContextRoot("/jstl_1_0_compat_web"); - return super.run(args, out, err); - } /* * @testName: positiveBundleLocalizationScopeTest @@ -74,12 +108,15 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * bundle action, that any messages within the body of the bundle action are * properly localized and any message actions outside the body are not. */ + @Test public void positiveBundleLocalizationScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleLocalizationScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleLocalizationScopeTest"); TEST_PROPS.setProperty(REQUEST, "GET /jstl_1_0_compat_web/positiveBundleLocalizationScopeTest.jsp HTTP/1.1"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveBundleLocalizationScopeTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveBundleLocalizationScopeTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -93,7 +130,10 @@ public void positiveBundleLocalizationScopeTest() throws Exception { * into the variable name designated by the var attribute and validate the * type of var as it should be the type of the Throwable. */ + @Test public void positiveCatchVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCatchVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveCatchVarTest"); invoke(); } @@ -111,7 +151,10 @@ public void positiveCatchVarTest() throws Exception { * single 'when' evaluating to false which should cause the 'otherwise' action * to process its body */ + @Test public void positiveCWOTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCWOTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveCWOTest"); invoke(); } @@ -125,7 +168,10 @@ public void positiveCWOTest() throws Exception { * can be executed using sql:dateParam action specifying a type of 'timestamp' * - Validate that you get the expected number of rows back. */ + @Test public void positiveDateParamQueryTimestampTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamQueryTimestampTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveDateParamQueryTimestampTest"); invoke(); @@ -143,7 +189,10 @@ public void positiveDateParamQueryTimestampTest() throws Exception { * getCharacterEncoding() against the request object after the action has been * called. */ + @Test public void positiveDefaultEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDefaultEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveDefaultEncodingTest"); invoke(); } @@ -156,7 +205,10 @@ public void positiveDefaultEncodingTest() throws Exception { * @testStrategy: Validate that formatDate action can properly format dates * provided as String literals or as java.util.Date objects. */ + @Test public void positiveFDValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveFDValueTest"); invoke(); } @@ -170,7 +222,10 @@ public void positiveFDValueTest() throws Exception { * as well as validating that if scope is not specified, var will be exported * to the page scope by default. */ + @Test public void positiveFNScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveFNScopeTest"); invoke(); } @@ -189,13 +244,16 @@ public void positiveFNScopeTest() throws Exception { * action correctly uses the locale from the base name attribute, then no * parse exception will occur. */ + @Test public void positiveFormatLocalizationContextI18NTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFormatLocalizationContextI18NTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFormatLocalizationContextI18NTest"); TEST_PROPS.setProperty(REQUEST, "positiveFormatLocalizationContextI18NTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveFormatLocalizationContextI18NTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveFormatLocalizationContextI18NTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -208,7 +266,10 @@ public void positiveFormatLocalizationContextI18NTest() throws Exception { * @testStrategy: Validate that forTokens can properly Iterate over a String * provided with specified delimiters. */ + @Test public void positiveForTokensTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForTokensTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveForTokensTest"); invoke(); } @@ -223,7 +284,10 @@ public void positiveForTokensTest() throws Exception { * attribute. If scope is not specified, the exported var should be in the * page scope, otherwise the exported var should be in the designated scope. */ + @Test public void positiveIfScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveIfScopeTest"); invoke(); } @@ -236,7 +300,10 @@ public void positiveIfScopeTest() throws Exception { * @testStrategy: Validate that resources identified by an absolute URL can be * imported and displayed. This will test absolute URLs for HTTP and FTP */ + @Test public void positiveImportAbsUrlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportAbsUrlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveImportAbsUrlTest"); invoke(); } @@ -249,7 +316,10 @@ public void positiveImportAbsUrlTest() throws Exception { * @testStrategy: Validate that arrays of Object types can be handled by * 'forEach'. */ + @Test public void positiveItemsObjArrayTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsObjArrayTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveItemsObjArrayTest"); invoke(); } @@ -264,6 +334,7 @@ public void positiveItemsObjArrayTest() throws Exception { * tags. If defined correctly, a fatal translation error should not occur ( * per section 7.3.6.2 of the JavaServer Pages 1.2 Specification. */ + @Test public void positiveJSTLURITest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveJSTLURITest"); TEST_PROPS.setProperty(REQUEST, "positiveJSTLURITest.jsp"); @@ -280,9 +351,12 @@ public void positiveJSTLURITest() throws Exception { * and display the message associated with the provided key. This will also * establish that the key attribute can accept both static and dynamic values. */ + @Test public void positiveMessageKeyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -297,7 +371,10 @@ public void positiveMessageKeyTest() throws Exception { * occur if the escapeXml is not present, or the value is true. Also validate * that no escaping occurs if the value is false. */ + @Test public void positiveOutEscXmlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutEscXmlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveOutEscXmlTest"); invoke(); } @@ -310,7 +387,10 @@ public void positiveOutEscXmlTest() throws Exception { * @testStrategy: Validate the the name and value attributes can accept both * dynamic and static values. */ + @Test public void positiveParamNameValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamNameValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveParamNameValueTest"); invoke(); } @@ -324,9 +404,12 @@ public void positiveParamNameValueTest() throws Exception { * @testStrategy: Validate that parametric replacement occurs when param * subtags are specified with either dynamic or static values. */ + @Test public void positiveParamValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveParamValueTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveParamValueTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -341,7 +424,10 @@ public void positiveParamValueTest() throws Exception { * is specified, the result is available via the PageContext and is of type * java.lang.Object. */ + @Test public void positiveParseVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveParseVarTest"); invoke(); } @@ -355,7 +441,10 @@ public void positiveParseVarTest() throws Exception { * provided as dynamic or static String values. Pass the parsed value to * formatDate to display (due to possible timezone difference). */ + @Test public void positivePDValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positivePDValueTest"); invoke(); } @@ -369,6 +458,7 @@ public void positivePDValueTest() throws Exception { * libraries is specified as a paramter to the PermittedTaglibsTLV, that the * use of this library doesn't generate a translation error. */ + @Test public void positivePermittedTlvTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positivePermittedTlvTest"); TEST_PROPS.setProperty(REQUEST, "positivePermittedTlvTest.jsp"); @@ -384,7 +474,10 @@ public void positivePermittedTlvTest() throws Exception { * @testStrategy: Validate the action can correctly parse dynamic and static * values provided to the value attribute. */ + @Test public void positivePNValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positivePNValueTest"); invoke(); } @@ -399,7 +492,10 @@ public void positivePNValueTest() throws Exception { * as well as validating that if scope is not specified, var will be exported * to the page scope by default. */ + @Test public void positiveQueryScopeAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryScopeAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveQueryScopeAttributeTest"); invoke(); } @@ -413,6 +509,7 @@ public void positiveQueryScopeAttributeTest() throws Exception { * @testStrategy: Validate that the action can properly redirect when the url * attribute is provided either a dynamic or static values. */ + @Test public void positiveRedirectTest() throws Exception { /* EL */ // abs @@ -520,7 +617,10 @@ public void positiveRedirectTest() throws Exception { * remove the attribute no matter the scope in which it exists. Also validate * that if scope is specified, the var is properly removed. */ + @Test public void positiveRemoveScopeVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRemoveScopeVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveRemoveScopeVarTest"); invoke(); } @@ -533,7 +633,10 @@ public void positiveRemoveScopeVarTest() throws Exception { * @testStrategy: Validate that the correct number of rows is returned by * Result.getRows(). */ + @Test public void positiveResultGetRowsCountTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsCountTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveResultGetRowsCountTest"); invoke(); } @@ -547,6 +650,7 @@ public void positiveResultGetRowsCountTest() throws Exception { * configured validator, a translation error occurs if a declaration is * encountered. */ + @Test public void negativeScriptFreeTlvNoDeclTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeScriptFreeTlvNoDeclTest"); TEST_PROPS.setProperty(REQUEST, "negativeScriptFreeTlvNoDeclTest.jsp"); @@ -564,11 +668,14 @@ public void negativeScriptFreeTlvNoDeclTest() throws Exception { * scope attribute. If scope is not present and var is, var will be exported * to the page scope by default. */ + @Test public void positiveSetBundleScopeVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleScopeVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleScopeVarTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleScopeVarTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeVarTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeVarTest.gf"); invoke(); } @@ -580,7 +687,10 @@ public void positiveSetBundleScopeVarTest() throws Exception { * @testStrategy: Validate sql:setDataSource exports the var attribute to the * correct scope. */ + @Test public void positiveSetDataSourceScopeAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceScopeAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveSetDataSourceScopeAttributeTest"); invoke(); @@ -594,7 +704,10 @@ public void positiveSetDataSourceScopeAttributeTest() throws Exception { * @testStrategy: Validate value can accept both String representations or * locales as well as instances of java.util.Locale. */ + @Test public void positiveSetLocaleValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveSetLocaleValueTest"); invoke(); } @@ -610,7 +723,10 @@ public void positiveSetLocaleValueTest() throws Exception { * scopes and then print the values using PageContext.getAttribute(String, * int). */ + @Test public void positiveSetScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveSetScopeTest"); invoke(); } @@ -624,7 +740,10 @@ public void positiveSetScopeTest() throws Exception { * select is provided a valid XPath expression and the the variable reference * by var is available to another action. */ + @Test public void positiveSetSelectVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetSelectVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveSetSelectVarTest"); invoke(); } @@ -639,7 +758,10 @@ public void positiveSetSelectVarTest() throws Exception { * values as well as three letter timezones (ex. PST) or fully qualified * values (ex. America/Los_Angeles). */ + @Test public void positiveSetTimezoneValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveSetTimezoneValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -655,7 +777,10 @@ public void positiveSetTimezoneValueTest() throws Exception { * values as well as three letter timezones (ex. PST) or fully qualified * values (ex. America/Los_Angeles). */ + @Test public void positiveTimezoneValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTimezoneValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveTimezoneValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -672,7 +797,10 @@ public void positiveTimezoneValueTest() throws Exception { * reference by var is available in the PageContext and is of type * org.w3c.dom.Document. */ + @Test public void positiveTransformVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTransformVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveTransformVarTest"); invoke(); } @@ -685,7 +813,10 @@ public void positiveTransformVarTest() throws Exception { * @testStrategy: Validate sql:transaction and sql:query actions allow a query * to be successfully executed. */ + @Test public void positiveTxQueryCommitTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxQueryCommitTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveTxQueryCommitTest"); invoke(); } @@ -698,7 +829,10 @@ public void positiveTxQueryCommitTest() throws Exception { * @testStrategy: Validate the sql:update action - That a SQL query can be * passed as body content. */ + @Test public void positiveUpdateBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveUpdateBodyContentTest"); invoke(); } @@ -711,7 +845,10 @@ public void positiveUpdateBodyContentTest() throws Exception { * @testStrategy: Validate the behavior of the scope attribute with respect to * var, both when scope is explicitly defined and when not defined. */ + @Test public void positiveUrlScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveUrlScopeTest"); invoke(); } @@ -724,6 +861,7 @@ public void positiveUrlScopeTest() throws Exception { * @testStrategy: Validate the name attribute of the x:param action is able to * accept both static and dynamic values. */ + @Test public void positiveXParamNameTest() throws Exception { // TEST_PROPS.setProperty(STANDARD_COMPAT, "positiveXParamNameTest"); TEST_PROPS.setProperty(REQUEST, diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java b/jstl/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java new file mode 100644 index 0000000000..71f116506e --- /dev/null +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.jstl.lib.implementation.sun.common; + +import java.net.*; +import com.sun.ts.lib.util.*; +import com.sun.ts.lib.porting.*; + +/** + * This is a J2EE Reference specific implementation of the TSURLInterface which + * is to be used for J2EE-TS testing. TS tests use this interface to obtain the + * URL String to use to access a given web component. If a given J2EE Server + * implmentation requires that URLs be created in a different manner, then this + * implementation can be replaced. + * + * @author Kyle Grucci + */ +public class SunRIURL implements TSURLInterface { + private URL url = null; + + /** + * This method is called by TS tests to get the URL to use to access a given + * web component. + * + * @param protocol + * - the name of the protocol. + * @param host + * - the name of the host. + * @param port + * - the port number. + * @param file + * - the host file. + * @return a valid URL object. + */ + public URL getURL(String protocol, String host, int port, String file) + throws MalformedURLException { + try { + url = new URL(protocol, host, port, file); + } catch (MalformedURLException e) { + TestUtil.logErr("Failed during URL creation", e); + throw e; + } + return url; + } + + /** + * This method is called by TS tests to get the URL to use to access a given + * web component. + * + * @param protocol + * - the name of the protocol. + * @param host + * - the name of the host. + * @param port + * - the port number. + * @param file + * - the host file. + * @return a valid URL as a String. + */ + public String getURLString(String protocol, String host, int port, + String file) { + if (file.startsWith("/")) + return protocol + "://" + host + ":" + port + file; + else + return protocol + "://" + host + ":" + port + "/" + file; + } + + /** + * This method is called by TS tests to get the request string to use to + * access a given web component. + * + * @param request + * - the request file. + * @return a valid String object. + */ + public String getRequest(String request) { + return request; + } +} diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java similarity index 62% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java index c528a08820..1ee5b0c399 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -14,54 +14,51 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ package com.sun.ts.tests.jstl.spec.core.conditional.cwo; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + + public JSTLClientIT() throws Exception { + setContextRoot("/jstl_core_cond_cwo_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_cond_cwo_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_cond_cwo_web.xml")); - setContextRoot("/jstl_core_cond_cwo_web"); - setGoldenFileDir("/jstl/spec/core/conditional/cwo"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWONoWhenActionsTest.jsp")), "negativeCWONoWhenActionsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOOtherwiseExcBodyContentTest.jsp")), "negativeCWOOtherwiseExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOOtherwiseNoParentTest.jsp")), "negativeCWOOtherwiseNoParentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenBeforeOtherwiseTest.jsp")), "negativeCWOWhenBeforeOtherwiseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenExcBodyContentTest.jsp")), "negativeCWOWhenExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenNoParentTest.jsp")), "negativeCWOWhenNoParentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenTestReqAttrTest.jsp")), "negativeCWOWhenTestReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenTypeTest.jsp")), "negativeCWOWhenTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCWOTest.jsp")), "positiveCWOTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -77,7 +74,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * single 'when' evaluating to false which should cause the 'otherwise' action * to process its body */ + @Test public void positiveCWOTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCWOTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveCWOTest"); invoke(); } @@ -91,7 +91,10 @@ public void positiveCWOTest() throws Exception { * jakarta.servlet.jsp.JspTagException if the expression evaluates to a type not * expected by the tag. */ + @Test public void negativeCWOWhenTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeCWOWhenTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeCWOWhenTypeTest"); invoke(); } @@ -104,7 +107,10 @@ public void negativeCWOWhenTypeTest() throws Exception { * @testStrategy: Validate that an exception caused by the body content of a * when action is properly propagated to and by the choose action. */ + @Test public void negativeCWOWhenExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeCWOWhenExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeCWOWhenExcBodyContentTest"); invoke(); } @@ -117,7 +123,10 @@ public void negativeCWOWhenExcBodyContentTest() throws Exception { * @testStrategy: Validate that an exception caused by the body content of an * otherwise action is properly propagaged to and by the choose action. */ + @Test public void negativeCWOOtherwiseExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeCWOOtherwiseExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeCWOOtherwiseExcBodyContentTest"); invoke(); } @@ -130,6 +139,7 @@ public void negativeCWOOtherwiseExcBodyContentTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the choose * action has no nested when actions. */ + @Test public void negativeCWONoWhenActionsTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWONoWhenActionsTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWONoWhenActionsTest.jsp"); @@ -145,6 +155,7 @@ public void negativeCWONoWhenActionsTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if otherwise * appears before when or if when appears after otherwise. */ + @Test public void negativeCWOWhenBeforeOtherwiseTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenBeforeOtherwiseTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenBeforeOtherwiseTest.jsp"); @@ -160,6 +171,7 @@ public void negativeCWOWhenBeforeOtherwiseTest() throws Exception { * @testStrategy: Validate a fatal translation error occurs if a when action * has no choose as an immediate parent. */ + @Test public void negativeCWOWhenNoParentTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenNoParentTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenNoParentTest.jsp"); @@ -175,6 +187,7 @@ public void negativeCWOWhenNoParentTest() throws Exception { * @testStrategy: Validate a fatal translation error occurs if an otherwise * action has no choose as an immediate parent. */ + @Test public void negativeCWOOtherwiseNoParentTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOOtherwiseNoParentTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOOtherwiseNoParentTest.jsp"); @@ -190,6 +203,7 @@ public void negativeCWOOtherwiseNoParentTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if a nested * when action has no 'test' attribute. */ + @Test public void negativeCWOWhenTestReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenTestReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenTestReqAttrTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java similarity index 52% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java index e4f238b412..acd5e94210 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -14,54 +14,47 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ - package com.sun.ts.tests.jstl.spec.core.conditional.iftag; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_cond_if_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_cond_if_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_cond_if_web.xml")); - setContextRoot("/jstl_core_cond_if_web"); - setGoldenFileDir("/jstl/spec/core/conditional/iftag"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfExcBodyContentTest.jsp")), "negativeIfExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfTestTypeTest.jsp")), "negativeIfTestTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfBodyBehaviorTest.jsp")), "positiveIfBodyBehaviorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfExportedVarTypeTest.jsp")), "positiveIfExportedVarTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfScopeTest.jsp")), "positiveIfScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfTest.jsp")), "positiveIfTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +65,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Verify 'test' and 'var' attribute behavior of the 'if' * action with no content body */ + @Test public void positiveIfTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfTest"); invoke(); } @@ -85,7 +81,10 @@ public void positiveIfTest() throws Exception { * @testStrategy: Verify the behavior of the 'if' action with regards to the * result of it's test and it's body content */ + @Test public void positiveIfBodyBehaviorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfBodyBehaviorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfBodyBehaviorTest"); invoke(); } @@ -100,7 +99,10 @@ public void positiveIfBodyBehaviorTest() throws Exception { * attribute. If scope is not specified, the exported var should be in the * page scope, otherwise the exported var should be in the designated scope. */ + @Test public void positiveIfScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfScopeTest"); invoke(); } @@ -113,7 +115,10 @@ public void positiveIfScopeTest() throws Exception { * @testStrategy: Validate that the variable exported by the 'if' action is of * type 'java.lang.Boolean' */ + @Test public void positiveIfExportedVarTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfExportedVarTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfExportedVarTypeTest"); invoke(); } @@ -128,7 +133,10 @@ public void positiveIfExportedVarTypeTest() throws Exception { * passed ot the 'test' attribute is not of the expected type (boolean/Boolean * for EL, and boolean for RT). */ + @Test public void negativeIfTestTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeIfTestTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeIfTestTypeTest"); invoke(); } @@ -141,7 +149,10 @@ public void negativeIfTestTypeTest() throws Exception { * @testStrategy: Validate that exceptions caused by the body content are * propagated. */ + @Test public void negativeIfExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeIfExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeIfExcBodyContentTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java similarity index 52% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java index 16dde76e59..9194f5c2d9 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java @@ -14,54 +14,44 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.general.catchtag; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_gen_catch_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_gen_catch_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_gen_catch_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_core_gen_catch_web"); - setGoldenFileDir("/jstl/spec/core/general/catchtag"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCatchTest.jsp")), "positiveCatchTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCatchVarTest.jsp")), "positiveCatchVarTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,7 +63,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * specified, will catch the Throwable and allow the page to continue * processing. */ + @Test public void positiveCatchTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCatchTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveCatchTest"); invoke(); } @@ -87,7 +80,10 @@ public void positiveCatchTest() throws Exception { * into the variable name designated by the var attribute and validate the * type of var as it should be the type of the Throwable. */ + @Test public void positiveCatchVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCatchVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveCatchVarTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java similarity index 55% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java index 11108da2eb..cbe02c92a9 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java @@ -14,54 +14,51 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.general.outtag; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_gen_out_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_gen_out_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_gen_out_web.xml")); - setContextRoot("/jstl_core_gen_out_web"); - setGoldenFileDir("/jstl/spec/core/general/outtag"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutValueAttributeTest.jsp")), "positiveOutValueAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutDefaultAttributeTest.jsp")), "positiveOutDefaultAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutBodyBehaviorTest.jsp")), "positiveOutBodyBehaviorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutEscXmlDefaultTest.jsp")), "positiveOutEscXmlDefaultTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutEscXmlTest.jsp")), "positiveOutEscXmlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeOutBodyContentExcTest.jsp")), "negativeOutBodyContentExcTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutReaderTest.jsp")), "positiveOutReaderTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +69,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate the the 'value' attribute of the out action can * accept both EL and static values. */ + @Test public void positiveOutValueAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutValueAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutValueAttributeTest"); invoke(); } @@ -85,7 +85,10 @@ public void positiveOutValueAttributeTest() throws Exception { * @testStrategy: Validate that the 'default' attribute of the out action can * accept both EL and static values. */ + @Test public void positiveOutDefaultAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutDefaultAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutDefaultAttributeTest"); invoke(); } @@ -100,7 +103,10 @@ public void positiveOutDefaultAttributeTest() throws Exception { * action. * */ + @Test public void positiveOutBodyBehaviorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutBodyBehaviorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutBodyBehaviorTest"); invoke(); } @@ -113,7 +119,10 @@ public void positiveOutBodyBehaviorTest() throws Exception { * @testStrategy: Validate that if escapeXml is not specified, the escaping of * <, >, ', ", & will be performed by default. */ + @Test public void positiveOutEscXmlDefaultTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutEscXmlDefaultTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutEscXmlDefaultTest"); invoke(); } @@ -128,7 +137,10 @@ public void positiveOutEscXmlDefaultTest() throws Exception { * setting is true or false. If true, <, >, ', ", and & will be escaped, and * if false, no escaping is performed. */ + @Test public void positiveOutEscXmlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutEscXmlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutEscXmlTest"); invoke(); } @@ -141,7 +153,10 @@ public void positiveOutEscXmlTest() throws Exception { * @testStrategy: Validate that an exception caused by the body content is * properly propagated and not handled by the action. */ + @Test public void negativeOutBodyContentExcTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeOutBodyContentExcTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeOutBodyContentExcTest"); invoke(); } @@ -155,6 +170,7 @@ public void negativeOutBodyContentExcTest() throws Exception { * value attribute of the out tag, that the contents of the reader are emitted * to the current JspWriter object. */ + @Test public void positiveOutReaderTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_gen_out_web/positiveOutReaderTest.jsp HTTP/1.1"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java similarity index 53% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java index 065233a712..013e6bfe91 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java @@ -14,54 +14,44 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.general.remove; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + /** Creates new JSTLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_core_gen_rem_web"); } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - setContextRoot("/jstl_core_gen_rem_web"); - setGoldenFileDir("/jstl/spec/core/general/remove"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_gen_rem_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_gen_rem_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRemoveScopeVarTest.jsp")), "positiveRemoveScopeVarTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -74,7 +64,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * remove the attribute no matter the scope in which it exists. Also validate * that if scope is specified, the var is properly removed. */ + @Test public void positiveRemoveScopeVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRemoveScopeVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveRemoveScopeVarTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java index aa2245ae63..9a288d625d 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java @@ -14,54 +14,51 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ -package com.sun.ts.tests.jstl.spec.core.general.set; -import java.io.PrintWriter; +package com.sun.ts.tests.jstl.spec.core.general.set; -import com.sun.javatest.Status; +import java.io.IOException; +import java.io.InputStream; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_gen_set_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_gen_set_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_gen_set_web.xml")); - setContextRoot("/jstl_core_gen_set_web"); - setGoldenFileDir("/jstl/spec/core/general/set"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetBodyContentExcTest.jsp")), "negativeSetBodyContentExcTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetTargetNullInvalidObjTest.jsp")), "negativeSetTargetNullInvalidObjTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBodyBehaviorTest.jsp")), "positiveSetBodyBehaviorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDeferredValueTest.jsp")), "positiveSetDeferredValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetNullValueTest.jsp")), "positiveSetNullValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropertyTest.jsp")), "positiveSetPropertyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetScopeTest.jsp")), "positiveSetScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTest.jsp")), "positiveSetTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,7 +70,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * 'value' attribute are made available to the test page by using to * print the values. */ + @Test public void positiveSetTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTest"); invoke(); } @@ -86,7 +86,10 @@ public void positiveSetTest() throws Exception { * @testStrategy: Validate the value of the exported var can be set within the * body of the action. Verify the result using */ + @Test public void positiveSetBodyBehaviorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBodyBehaviorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetBodyBehaviorTest"); invoke(); } @@ -102,7 +105,10 @@ public void positiveSetBodyBehaviorTest() throws Exception { * scopes and then print the values using PageContext.getAttribute(String, * int). */ + @Test public void positiveSetScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetScopeTest"); invoke(); } @@ -121,7 +127,10 @@ public void positiveSetScopeTest() throws Exception { * a property in a Bean and value is null, will return null when calling the * get method for that propery after the set completes. */ + @Test public void positiveSetNullValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetNullValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetNullValueTest"); invoke(); } @@ -135,7 +144,10 @@ public void positiveSetNullValueTest() throws Exception { * and set key/values in Map instances using the target and property * attributes. */ + @Test public void positiveSetPropertyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropertyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetPropertyTest"); invoke(); } @@ -148,7 +160,10 @@ public void positiveSetPropertyTest() throws Exception { * @testStrategy: Validate that if the body content of the action is thrown, * that it is properly propagated. */ + @Test public void negativeSetBodyContextExcTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetBodyContentExcTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetBodyContentExcTest"); invoke(); } @@ -162,7 +177,10 @@ public void negativeSetBodyContextExcTest() throws Exception { * the target attribute is null, or is provided an object that is no a * JavaBean or an instance of java.util.Map. */ + @Test public void negativeSetTargetNullInvalidObjTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetTargetNullInvalidObjTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetTargetNullInvalidObjTest"); invoke(); } @@ -176,7 +194,10 @@ public void negativeSetTargetNullInvalidObjTest() throws Exception { * second tag, set the variable to have application scope. Verify that the * value can be retrieved after the execution of the tag. */ + @Test public void positiveSetDeferredValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDeferredValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDeferredValueTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java similarity index 56% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java index c002052f43..86ac261a95 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java @@ -14,54 +14,68 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.iteration.foreach; +import java.io.IOException; import java.io.PrintWriter; -import com.sun.javatest.Status; +import java.io.InputStream; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + /** Creates new JSTLClient */ + public JSTLClientIT() { setContextRoot("/jstl_core_iter_foreach_web"); - setGoldenFileDir("/jstl/spec/core/iteration/foreach"); + } - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_iter_foreach_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_iter_foreach_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveVarTest.jsp")), "positiveVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveVarStatusTest.jsp")), "positiveVarStatusTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveNoItemsIterationTest.jsp")), "positiveNoItemsIterationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsStepTest.jsp")), "positiveItemsStepTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsPrimArrayTest.jsp")), "positiveItemsPrimArrayTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsObjArrayTest.jsp")), "positiveItemsObjArrayTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsNullTest.jsp")), "positiveItemsNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsMapTest.jsp")), "positiveItemsMapTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsIteratorTest.jsp")), "positiveItemsIteratorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsEnumerationTest.jsp")), "positiveItemsEnumerationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsEndTest.jsp")), "positiveItemsEndTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsCommaSepStringTest.jsp")), "positiveItemsCommaSepStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsCollectionTest.jsp")), "positiveItemsCollectionTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsBeginTest.jsp")), "positiveItemsBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachEndLTBeginTest.jsp")), "positiveForEachEndLTBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachDeferredValueTest3.jsp")), "positiveForEachDeferredValueTest3.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachDeferredValueTest2.jsp")), "positiveForEachDeferredValueTest2.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachDeferredValueTest1.jsp")), "positiveForEachDeferredValueTest1.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBodyBehaviorTest.jsp")), "positiveBodyBehaviorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFEStepTypeTest.jsp")), "negativeFEStepTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFEItemsTypeTest.jsp")), "negativeFEItemsTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFEExcBodyContentTest.jsp")), "negativeFEExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFEEndTypeTest.jsp")), "negativeFEEndTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFEBeginTypeTest.jsp")), "negativeFEBeginTypeTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -75,7 +89,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * by var, previously existed, it should no longer exist after completion of * the action. */ + @Test public void positiveVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveVarTest"); invoke(); } @@ -89,7 +106,10 @@ public void positiveVarTest() throws Exception { * by 'forEach' and that the values in the underlying array are wrapped with * its corresponding wrapper type. */ + @Test public void positiveItemsPrimArrayTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsPrimArrayTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsPrimArrayTest"); invoke(); } @@ -102,7 +122,10 @@ public void positiveItemsPrimArrayTest() throws Exception { * @testStrategy: Validate that arrays of Object types can be handled by * 'forEach'. */ + @Test public void positiveItemsObjArrayTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsObjArrayTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsObjArrayTest"); invoke(); } @@ -115,7 +138,10 @@ public void positiveItemsObjArrayTest() throws Exception { * @testStrategy: Validate that 'forEach' can handle various Collection * objects. */ + @Test public void positiveItemsCollectionTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsCollectionTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsCollectionTest"); invoke(); } @@ -127,7 +153,10 @@ public void positiveItemsCollectionTest() throws Exception { * * @testStrategy: Validate that 'forEach' can handle an Enumeration */ + @Test public void positiveItemsEnumerationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsEnumerationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsEnumerationTest"); invoke(); } @@ -139,7 +168,10 @@ public void positiveItemsEnumerationTest() throws Exception { * * @testStrategy: Validate that 'forEach' can handle an Iterator */ + @Test public void positiveItemsIteratorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsIteratorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_iter_foreach_web/positiveItemsIteratorTest.jsp HTTP/1.1"); TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); @@ -154,7 +186,10 @@ public void positiveItemsIteratorTest() throws Exception { * * @testStrategy: Validate that 'forEach' can handle Map objects */ + @Test public void positiveItemsMapTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsMapTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_iter_foreach_web/positiveItemsMapTest.jsp HTTP/1.1"); TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); @@ -168,7 +203,10 @@ public void positiveItemsMapTest() throws Exception { * * @testStrategy: Validate that 'forEach' can handle a comma-separated string */ + @Test public void positiveItemsCommaSepStringTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsCommaSepStringTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsCommaSepStringTest"); invoke(); } @@ -182,7 +220,10 @@ public void positiveItemsCommaSepStringTest() throws Exception { * attribute accept dynamic and static attribute values - Behavior of the * action when the 'begin' attribute is specified */ + @Test public void positiveItemsBeginTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsBeginTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsBeginTest"); invoke(); } @@ -196,7 +237,10 @@ public void positiveItemsBeginTest() throws Exception { * attribute accept dynamic and static attribute values - Behavior of the * action when the 'end' attribute is specified */ + @Test public void positiveItemsEndTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsEndTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsEndTest"); invoke(); } @@ -210,7 +254,10 @@ public void positiveItemsEndTest() throws Exception { * attribute accept dynamic and static attribute values - Behavior of the * action when the 'step' attribute is specified */ + @Test public void positiveItemsStepTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsStepTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsStepTest"); invoke(); } @@ -223,7 +270,10 @@ public void positiveItemsStepTest() throws Exception { * @testStrategy: Validate that varStatus is properly exported with nested * scope and is of type jakarta.servlet.jsp.jstl. LoopTagStatus. */ + @Test public void positiveVarStatusTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveVarStatusTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveVarStatusTest"); invoke(); } @@ -236,7 +286,10 @@ public void positiveVarStatusTest() throws Exception { * @testStrategy: Validate tag behavior when no 'items' attribute is * specified. */ + @Test public void positiveNoItemsIterationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveNoItemsIterationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveNoItemsIterationTest"); invoke(); } @@ -249,7 +302,10 @@ public void positiveNoItemsIterationTest() throws Exception { * @testStrategy: Validate that the 'forEach' action can handle body content * as well as an empty body. */ + @Test public void positiveBodyBehaviorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBodyBehaviorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveBodyBehaviorTest"); invoke(); } @@ -262,7 +318,10 @@ public void positiveBodyBehaviorTest() throws Exception { * @testStrategy: Validate that no iteration is performed by forEach if items * is null. */ + @Test public void positiveItemsNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsNullTest"); invoke(); } @@ -275,7 +334,10 @@ public void positiveItemsNullTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to items evaluates to an incorrect type. */ + @Test public void negativeFEItemsTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFEItemsTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFEItemsTypeTest"); invoke(); } @@ -288,7 +350,10 @@ public void negativeFEItemsTypeTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to begin evaluates to an incorrect type. */ + @Test public void negativeFEBeginTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFEBeginTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFEBeginTypeTest"); invoke(); } @@ -301,7 +366,10 @@ public void negativeFEBeginTypeTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to end evaluates to an incorrect type. */ + @Test public void negativeFEEndTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFEEndTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFEEndTypeTest"); invoke(); } @@ -314,7 +382,10 @@ public void negativeFEEndTypeTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to step evaluates to an incorrect type. */ + @Test public void negativeFEStepTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFEStepTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFEStepTypeTest"); invoke(); } @@ -327,7 +398,10 @@ public void negativeFEStepTypeTest() throws Exception { * @testStrategy: Validate that an exception caused by the body content is * propagated. */ + @Test public void negativeFEExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFEExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFEExcBodyContentTest"); invoke(); } @@ -340,6 +414,7 @@ public void negativeFEExcBodyContentTest() throws Exception { * @test_Strategy: Validate an end attribute value that is less than the begin * attribute value will result in the action not being executed. */ + @Test public void positiveForEachEndLTBeginTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_iter_foreach_web/positiveForEachEndLTBeginTest.jsp HTTP/1.1"); @@ -357,7 +432,10 @@ public void positiveForEachEndLTBeginTest() throws Exception { * tag, set each item to have application scope. Verify that the items can be * retrieved after the execution of the tag. */ + @Test public void positiveForEachDeferredValueTest1() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachDeferredValueTest1.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachDeferredValueTest1"); invoke(); } @@ -373,7 +451,10 @@ public void positiveForEachDeferredValueTest1() throws Exception { * scope. Verify that the items can be retrieved after the execution of the * tag. */ + @Test public void positiveForEachDeferredValueTest2() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachDeferredValueTest2.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachDeferredValueTest2"); invoke(); } @@ -388,7 +469,10 @@ public void positiveForEachDeferredValueTest2() throws Exception { * the body of the tag, set each item to have application scope. Verify that * the items can be retrieved after the execution of the tag. */ + @Test public void positiveForEachDeferredValueTest3() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachDeferredValueTest3.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachDeferredValueTest3"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java similarity index 54% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java index 6a11744218..bf81abddf1 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java @@ -14,54 +14,59 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.iteration.fortokens; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_iter_fortok_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_iter_fortok_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_iter_fortok_web.xml")); - setContextRoot("/jstl_core_iter_fortok_web"); - setGoldenFileDir("/jstl/spec/core/iteration/fortokens"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFTBeginTypeTest.jsp")), "negativeFTBeginTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFTEndTypeTest.jsp")), "negativeFTEndTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFTExcBodyContentTest.jsp")), "negativeFTExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFTStepTypeTest.jsp")), "negativeFTStepTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBeginTest.jsp")), "positiveBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBodyBehaviorTest.jsp")), "positiveBodyBehaviorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDelimsNullTest.jsp")), "positiveDelimsNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveEndTest.jsp")), "positiveEndTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForTokensDeferredValueTest.jsp")), "positiveForTokensDeferredValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForTokensEndLTBeginTest.jsp")), "positiveForTokensEndLTBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForTokensTest.jsp")), "positiveForTokensTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsDelimsNullTest.jsp")), "positiveItemsDelimsNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveItemsNullTest.jsp")), "positiveItemsNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveStepTest.jsp")), "positiveStepTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveVarStatusTest.jsp")), "positiveVarStatusTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,7 +78,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that forTokens can properly Iterate over a String * provided with specified delimiters. */ + @Test public void positiveForTokensTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForTokensTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForTokensTest"); invoke(); } @@ -86,7 +94,10 @@ public void positiveForTokensTest() throws Exception { * @testStrategy: Validate that when varStatus is specified that the exported * var name is of type jakarta.servlet.jsp.jstl.LoopTagStatus */ + @Test public void positiveVarStatusTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveVarStatusTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveVarStatusTest"); invoke(); } @@ -99,7 +110,10 @@ public void positiveVarStatusTest() throws Exception { * @testStrategy: Validate that 'begin' starts in the proper location of the * tokens created from the passed String. */ + @Test public void positiveBeginTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBeginTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveBeginTest"); invoke(); } @@ -112,7 +126,10 @@ public void positiveBeginTest() throws Exception { * @testStrategy: Validate that when 'end' is specified, that the action stops * processing once it reaches the appropriate token in the list. */ + @Test public void positiveEndTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveEndTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveEndTest"); invoke(); } @@ -125,7 +142,10 @@ public void positiveEndTest() throws Exception { * @testStrategy: Validate that when 'step' is specified, the action only * processes every 'step' tokens. */ + @Test public void positiveStepTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveStepTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveStepTest"); invoke(); } @@ -138,7 +158,10 @@ public void positiveStepTest() throws Exception { * @testStrategy: Validate that the 'forEach' action can handle bodies * containing content as well as empty bodies. */ + @Test public void positiveBodyBehaviorTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBodyBehaviorTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveBodyBehaviorTest"); invoke(); } @@ -150,7 +173,10 @@ public void positiveBodyBehaviorTest() throws Exception { * * @testStrategy: Validate that if items is null, no iteration is performed. */ + @Test public void positiveItemsNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsNullTest"); invoke(); } @@ -163,7 +189,10 @@ public void positiveItemsNullTest() throws Exception { * @testStrategy: Validate that if delims is null, items is treated as a * single token, i.e, only one iteration is performed. */ + @Test public void positiveDelimsNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDelimsNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDelimsNullTest"); invoke(); } @@ -176,7 +205,10 @@ public void positiveDelimsNullTest() throws Exception { * @testStrategy: Validate that if both delims and items is null, no iteration * is performed. */ + @Test public void positiveItemsDelimsNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveItemsDelimsNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveItemsDelimsNullTest"); invoke(); } @@ -189,7 +221,10 @@ public void positiveItemsDelimsNullTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to begin evaluates to an incorrect type. */ + @Test public void negativeFTBeginTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFTBeginTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFTBeginTypeTest"); invoke(); } @@ -202,7 +237,10 @@ public void negativeFTBeginTypeTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to end evaluates to an incorrect type. */ + @Test public void negativeFTEndTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFTEndTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFTEndTypeTest"); invoke(); } @@ -215,7 +253,10 @@ public void negativeFTEndTypeTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the EL expression passed to step evaluates to an incorrect type. */ + @Test public void negativeFTStepTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFTStepTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFTStepTypeTest"); invoke(); } @@ -228,7 +269,10 @@ public void negativeFTStepTypeTest() throws Exception { * @testStrategy: Validate that an exception caused by the actions's body * content is properly propagated. */ + @Test public void negativeFTExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFTExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFTExcBodyContentTest"); invoke(); } @@ -241,6 +285,7 @@ public void negativeFTExcBodyContentTest() throws Exception { * @test_Strategy: Validate an end attribute value that is less than the begin * attribute value will result in the action not being executed. */ + @Test public void positiveForTokensEndLTBeginTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_iter_fortok_web/positiveForTokensEndLTBeginTest.jsp HTTP/1.1"); @@ -258,7 +303,10 @@ public void positiveForTokensEndLTBeginTest() throws Exception { * the body of the tag, set each item to have application scope. Verify that * the items can be retrieved after the execution of the tag. */ + @Test public void positiveForTokensDeferredValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForTokensDeferredValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForTokensDeferredValueTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClient.java deleted file mode 100644 index ed594eb4f0..0000000000 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClient.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.jstl.spec.core.iteration.loopstatus; - -import java.io.PrintWriter; - -import com.sun.javatest.Status; -import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; - -public class JSTLClient extends AbstractUrlClient { - - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ - - /** Creates new JSTLClient */ - public JSTLClient() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_core_iter_lstat_web"); - setGoldenFileDir("/jstl/spec/core/iteration/loopstatus"); - - return super.run(args, out, err); - } - - /* - * @testName: positiveLoopTagStatusTest - * - * @assertion_ids: JSTL:SPEC:21.4.1 - * - * @testStrategy: Validate behavior of LoopStatusTag during an iteration - * through an array. - */ - public void positiveLoopTagStatusTest() throws Exception { - TEST_PROPS.setProperty(STANDARD, "positiveLoopTagStatusTest"); - invoke(); - } -} diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java new file mode 100644 index 0000000000..0b5c880891 --- /dev/null +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + + + +package com.sun.ts.tests.jstl.spec.core.iteration.loopstatus; + +import java.io.IOException; +import java.io.InputStream; + +import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + + /** Creates new JSTLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_core_iter_lstat_web"); + } + + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_iter_lstat_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_iter_lstat_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveLoopTagStatusTest.jsp")), "positiveLoopTagStatusTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); + + return archive; + } + + /* + * @testName: positiveLoopTagStatusTest + * + * @assertion_ids: JSTL:SPEC:21.4.1 + * + * @testStrategy: Validate behavior of LoopStatusTag during an iteration + * through an array. + */ + @Test + public void positiveLoopTagStatusTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveLoopTagStatusTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveLoopTagStatusTest"); + invoke(); + } +} diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java similarity index 52% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java index 3886c97330..dffc6c84c6 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java @@ -14,54 +14,86 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.urlresource.importtag; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import jakarta.servlet.ServletException; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /** Creates new JSTLClient */ - public JSTLClient() { - } +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /* - * public methods - * ======================================================================== - */ + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + /** Creates new JSTLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_core_url_import_web"); } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_core_url_import_web"); - setGoldenFileDir("/jstl/spec/core/urlresource/importtag"); - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_url_import_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_url_import_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportAbsResourceNon2xxTest.jsp")), "negativeImportAbsResourceNon2xxTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportCtxInvalidValueTest.jsp")), "negativeImportCtxInvalidValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportCtxUrlInvalidValueTest.jsp")), "negativeImportCtxUrlInvalidValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportRequestDispatcherNon2xxTest.jsp")), "negativeImportRequestDispatcherNon2xxTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportRequestDispatcherRTIOExceptionTest.jsp")), "negativeImportRequestDispatcherRTIOExceptionTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportRequestDispatcherServletExceptionTest.jsp")), "negativeImportRequestDispatcherServletExceptionTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportUrlEmptyTest.jsp")), "negativeImportUrlEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportUrlInvalidTest.jsp")), "negativeImportUrlInvalidTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportUrlNullTest.jsp")), "negativeImportUrlNullTest.jsp"); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportAbsUrlEnvPropTest.jsp")), "positiveImportAbsUrlEnvPropTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportAbsUrlTest.jsp")), "positiveImportAbsUrlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportBodyParamTest.jsp")), "positiveImportBodyParamTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportCharEncodingNullEmptyTest.jsp")), "positiveImportCharEncodingNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportCharEncodingTest.jsp")), "positiveImportCharEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportCtxRelUrlTest.jsp")), "positiveImportCtxRelUrlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportEncodingNotSpecifiedTest.jsp")), "positiveImportEncodingNotSpecifiedTest.jsp"); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportFollowRedirectTest.jsp")), "positiveImportFollowRedirectTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportPageRelUrlTest.jsp")), "positiveImportPageRelUrlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportRelUrlEnvPropTest.jsp")), "positiveImportRelUrlEnvPropTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportScopeTest.jsp")), "positiveImportScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportUrlTest.jsp")), "positiveImportUrlTest.jsp"); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportVarReaderTest.jsp")), "positiveImportVarReaderTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImportVarTest.jsp")), "positiveImportVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ResponseInternalServerError.jsp")), "ResponseInternalServerError.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ResponseScCreated.jsp")), "ResponseScCreated.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ResponseScGone.jsp")), "ResponseScGone.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ResponseSendRedirect.jsp")), "ResponseSendRedirect.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/RuntimeException.jsp")), "RuntimeException.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ServletException.jsp")), "ServletException.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/ServletExceptionRootCause.jsp")), "ServletExceptionRootCause.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/encoding/Encoding.jsp")), "encoding/Encoding.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/env.jsp")), "env.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import-encoded.txt")), "import-encoded.txt"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.jsp")), "import.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.txt")), "import.txt"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/IOException.jsp")), "IOException.jsp"); + + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -72,7 +104,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that the 'url' attribute accepts both dynamic and * static values. */ + @Test public void positiveImportUrlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportUrlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportUrlTest"); invoke(); } @@ -85,7 +120,10 @@ public void positiveImportUrlTest() throws Exception { * @testStrategy: Validate that resources identified by an absolute URL can be * imported and displayed. This will test absolute URLs for HTTP and FTP */ + @Test public void positiveImportAbsUrlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportAbsUrlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportAbsUrlTest"); invoke(); } @@ -100,7 +138,10 @@ public void positiveImportAbsUrlTest() throws Exception { * that sets the status to some 2xx value doesn't cause the page to throw an * Exception. */ + @Test public void positiveImportCtxRelUrlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportCtxRelUrlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportCtxRelUrlTest"); invoke(); } @@ -115,7 +156,10 @@ public void positiveImportCtxRelUrlTest() throws Exception { * sets the status to some 2xx value doesn't cause the page to throw an * Exception. */ + @Test public void positiveImportPageRelUrlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportPageRelUrlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportPageRelUrlTest"); invoke(); } @@ -128,7 +172,10 @@ public void positiveImportPageRelUrlTest() throws Exception { * @testStrategy: Validate that content of the imported resource is associated * with the variable name defined by the 'var' attribute. */ + @Test public void positiveImportVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportVarTest"); invoke(); } @@ -143,7 +190,10 @@ public void positiveImportVarTest() throws Exception { * the appropriate scope based on the presence or absence of the 'scope' * attribute. */ + @Test public void positiveImportScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportScopeTest"); invoke(); } @@ -157,11 +207,14 @@ public void positiveImportScopeTest() throws Exception { * that Application, Session, Request, and Request Parameters are available to * the target resource. */ + @Test public void positiveImportRelUrlEnvPropTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportRelUrlEnvPropTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveImportRelUrlEnvPropTest"); TEST_PROPS.setProperty(REQUEST, "positiveImportRelUrlEnvPropTest.jsp?reqpar=parm"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveImportRelUrlEnvPropTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveImportRelUrlEnvPropTest.gf"); invoke(); } @@ -174,11 +227,14 @@ public void positiveImportRelUrlEnvPropTest() throws Exception { * that only the Application (Context) information is available to the target * resource. */ + @Test public void positiveImportAbsUrlEnvPropTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportAbsUrlEnvPropTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveImportAbsUrlEnvPropTest"); TEST_PROPS.setProperty(REQUEST, "positiveImportAbsUrlEnvPropTest.jsp?reqpar=parm"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveImportAbsUrlEnvPropTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveImportAbsUrlEnvPropTest.gf"); invoke(); } @@ -190,7 +246,10 @@ public void positiveImportAbsUrlEnvPropTest() throws Exception { * @testStrategy: Validate that if the charEncoding attribute is set that the * encoding is indeed applied to the imported resource. */ + @Test public void positiveImportCharEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportCharEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(REQUEST, "GET /jstl_core_url_import_web/positiveImportCharEncodingTest.jsp HTTP/1.1"); TEST_PROPS.setProperty(SEARCH_STRING, @@ -207,7 +266,10 @@ public void positiveImportCharEncodingTest() throws Exception { * @testStrategy: Validate that if the charEncoding attribute is null or * empty, the action behaves as if it was not specified. */ + @Test public void positiveImportCharEncodingNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportCharEncodingNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportCharEncodingNullEmptyTest"); invoke(); } @@ -220,7 +282,10 @@ public void positiveImportCharEncodingNullEmptyTest() throws Exception { * @testStrategy: Validate the import action can properly handle nested param * subtags within the body content. */ + @Test public void positiveImportBodyParamTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportBodyParamTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportBodyParamTest"); invoke(); } @@ -235,7 +300,10 @@ public void positiveImportBodyParamTest() throws Exception { * variable during - and after the import action completed (variable is not * visible after action completes). */ + @Test public void positiveImportVarReaderTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportVarReaderTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportVarReaderTest"); invoke(); } @@ -248,7 +316,10 @@ public void positiveImportVarReaderTest() throws Exception { * @testStrategy: Validate that if the imported absolute resource sends a * redirect, the action properly follows the redirect and imports the target. */ + @Test public void positiveImportFollowRedirectTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportFollowRedirectTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportFollowRedirectTest"); invoke(); } @@ -261,7 +332,10 @@ public void positiveImportFollowRedirectTest() throws Exception { * @testStrategy: Validate that if context is provided an invalid value * (content root without a leading slash) an Exception is thrown. */ + @Test public void negativeImportCtxInvalidValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportCtxInvalidValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportCtxInvalidValueTest"); invoke(); } @@ -275,7 +349,10 @@ public void negativeImportCtxInvalidValueTest() throws Exception { * is provided an incorrect value (a path with no leading slash), an Exception * is thrown. */ + @Test public void negativeImportCtxUrlInvalidValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportCtxUrlInvalidValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportCtxUrlInvalidValueTest"); invoke(); } @@ -288,7 +365,10 @@ public void negativeImportCtxUrlInvalidValueTest() throws Exception { * @testStrategy: Validate that if the value of url is null, a * jakarta.servlet.jsp.JspException is thrown. */ + @Test public void negativeImportUrlNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportUrlNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportUrlNullTest"); invoke(); } @@ -301,7 +381,10 @@ public void negativeImportUrlNullTest() throws Exception { * @testStrategy: Validate that if the value of url is empty ("") a * jakarta.servlet.jsp.JspException is thrown. */ + @Test public void negativeImportUrlEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportUrlEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportUrlEmptyTest"); invoke(); } @@ -314,7 +397,10 @@ public void negativeImportUrlEmptyTest() throws Exception { * @testStrategy: Validate that if url is provided an invalid URL an instance * of jakarta.servlet.jsp.JspException is thrown. */ + @Test public void negativeImportUrlInvalidTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportUrlInvalidTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportUrlInvalidTest"); invoke(); } @@ -329,7 +415,10 @@ public void negativeImportUrlInvalidTest() throws Exception { * included in the Exception message. In this case, the test will import a JSP * via an absolute URL that sets the response to 410. */ + @Test public void negativeImportAbsResourceNon2xxTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportAbsResourceNon2xxTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportAbsResourceNon2xxTest"); invoke(); } @@ -344,7 +433,10 @@ public void negativeImportAbsResourceNon2xxTest() throws Exception { * code included in the Exception message. In this case, the test will import * a JSP via a relative URL that sets the response to 410. */ + @Test public void negativeImportRequestDispatcherNon2xxTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportRequestDispatcherNon2xxTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportRequestDispatcherNon2xxTest"); invoke(); @@ -360,7 +452,10 @@ public void negativeImportRequestDispatcherNon2xxTest() throws Exception { * of original exception included in the message and the original exception as * the root cause. */ + @Test public void negativeImportRequestDispatcherRTIOExceptionTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportRequestDispatcherRTIOExceptionTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportRequestDispatcherRTIOExceptionTest"); invoke(); @@ -378,8 +473,11 @@ public void negativeImportRequestDispatcherRTIOExceptionTest() throws Exception * if no root cause is present, the message of the ServletException is used * and the ServletException is the root cause of the JspException. */ + @Test public void negativeImportRequestDispatcherServletExceptionTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeImportRequestDispatcherServletExceptionTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeImportRequestDispatcherServletExceptionTest"); invoke(); @@ -395,7 +493,10 @@ public void negativeImportRequestDispatcherServletExceptionTest() * resource specifies no charset, then the default charset of ISO-8859-1 will * be used. */ + @Test public void positiveImportEncodingNotSpecifiedTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImportEncodingNotSpecifiedTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveImportEncodingNotSpecifiedTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java similarity index 51% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java index b7ce98ba49..06bff3462e 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java @@ -14,54 +14,52 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.urlresource.param; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_url_param_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_url_param_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_url_param_web.xml")); - setContextRoot("/jstl_core_url_param_web"); - setGoldenFileDir("/jstl/spec/core/urlresource/param"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.jsp")), "import.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParamExcBodyContentTest.jsp")), "negativeParamExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamAggregationTest.jsp")), "positiveParamAggregationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamBodyValueTest.jsp")), "positiveParamBodyValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamEncodingTest.jsp")), "positiveParamEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamNameNullEmptyTest.jsp")), "positiveParamNameNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamNameValueTest.jsp")), "positiveParamNameValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamValueNullTest.jsp")), "positiveParamValueNullTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,7 +71,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate the the name and value attributes can accept both * dynamic and static values. */ + @Test public void positiveParamNameValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamNameValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamNameValueTest"); invoke(); } @@ -86,7 +87,10 @@ public void positiveParamNameValueTest() throws Exception { * @testStrategy: Validate that the action properly encodes parameter names * and values if it contains characters that require URL encoding. */ + @Test public void positiveParamEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamEncodingTest"); invoke(); } @@ -99,7 +103,10 @@ public void positiveParamEncodingTest() throws Exception { * @testStrategy: Validate the the param tag can accept a parameter value as * body content. */ + @Test public void positiveParamBodyValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamBodyValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamBodyValueTest"); invoke(); } @@ -114,7 +121,10 @@ public void positiveParamBodyValueTest() throws Exception { * specified in the param tag. The value in the param tag should take * precedence. */ + @Test public void positiveParamAggregationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamAggregationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamAggregationTest"); invoke(); } @@ -127,7 +137,10 @@ public void positiveParamAggregationTest() throws Exception { * @testStrategy: Validate that if name is null or empty, that the action is * effectively ignored. */ + @Test public void positiveParamNameNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamNameNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamNameNullEmptyTest"); invoke(); } @@ -140,7 +153,10 @@ public void positiveParamNameNullEmptyTest() throws Exception { * @testStrategy: Validate that if value is null, that the value of the param * is an empty string (""). */ + @Test public void positiveParamValueNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamValueNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamValueNullTest"); invoke(); } @@ -153,7 +169,10 @@ public void positiveParamValueNullTest() throws Exception { * @testStrategy: Validate that if the body content of the action causes an * exception, that it is properly propagated. */ + @Test public void negativeParamExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeParamExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeParamExcBodyContentTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java similarity index 72% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java index f0da93f218..0c4567f06e 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java @@ -14,54 +14,48 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.urlresource.redirect; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_url_redirect_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_url_redirect_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_url_redirect_web.xml")); - setContextRoot("/jstl_core_url_redirect_web"); - setGoldenFileDir("/jstl/spec/core/urlresource/redirect"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeRedirectContextUrlInvalidValueTest.jsp")), "negativeRedirectContextUrlInvalidValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeRedirectExcBodyContentTest.jsp")), "negativeRedirectExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRedirectParamsBodyTest.jsp")), "positiveRedirectParamsBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRedirectTest.jsp")), "positiveRedirectTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,6 +66,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that the action can properly redirect when the url * attribute is provided either a dynamic or static values. */ + @Test public void positiveRedirectTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveRedirectTest"); @@ -128,6 +123,7 @@ public void positiveRedirectTest() throws Exception { * body content consists of param subtags. The params should be added to the * redirect URI. */ + @Test public void positiveRedirectParamsBodyTest() throws Exception { /* RT */ @@ -157,16 +153,20 @@ public void positiveRedirectParamsBodyTest() throws Exception { * @testStrategy: Validate that if the body content of the action causes an * exception that it is properly propagated. */ + @Test public void negativeRedirectExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeRedirectExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "negativeRedirectExcBodyContentTest"); TEST_PROPS.setProperty(REQUEST, "negativeRedirectExcBodyContentTest.jsp?el=true"); - TEST_PROPS.setProperty(GOLDENFILE, "negativeRedirectExcBodyContentTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "negativeRedirectExcBodyContentTest.gf"); invoke(); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "negativeRedirectExcBodyContentTest"); TEST_PROPS.setProperty(REQUEST, "negativeRedirectExcBodyContentTest.jsp?rt=true"); - TEST_PROPS.setProperty(GOLDENFILE, "negativeRedirectExcBodyContentTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "negativeRedirectExcBodyContentTest.gf"); invoke(); } @@ -179,7 +179,10 @@ public void negativeRedirectExcBodyContentTest() throws Exception { * either context or url are provided values that don't start with a leading * slash, an exception occurs. */ + @Test public void negativeRedirectContextUrlInvalidValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeRedirectContextUrlInvalidValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeRedirectContextUrlInvalidValueTest"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java similarity index 53% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java index 9d8cceb89d..c7c0951ab0 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java @@ -14,54 +14,53 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.core.urlresource.url; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_core_url_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_core_url_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_core_url_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlDisplayUrlTest.jsp")), "positiveUrlDisplayUrlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlValueVarTest.jsp")), "positiveUrlValueVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlScopeTest.jsp")), "positiveUrlScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlNoCharEncodingTest.jsp")), "positiveUrlNoCharEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlParamsBodyTest.jsp")), "positiveUrlParamsBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlAbsUrlNotRewrittenTest.jsp")), "positiveUrlAbsUrlNotRewrittenTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUrlExcBodyContentTest.jsp")), "negativeUrlExcBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUrlContextUrlInvalidValueTest.jsp")), "negativeUrlContextUrlInvalidValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlContextTest.jsp")), "positiveUrlContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUrlRelUrlRewrittenTest.jsp")), "positiveUrlRelUrlRewrittenTest.jsp"); - setContextRoot("/jstl_core_url_web"); - setGoldenFileDir("/jstl/spec/core/urlresource/url"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,6 +71,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that if var is not specified, the resulting value * of the url action is written to the current JspWriter. */ + @Test public void positiveUrlDisplayUrlTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveUrlDisplayUrlTest"); TEST_PROPS.setProperty(REQUEST, "positiveUrlDisplayUrlTest.jsp"); @@ -88,7 +88,10 @@ public void positiveUrlDisplayUrlTest() throws Exception { * attribute is properly associated with a variable designated by var. Compare * the result with that returned by response.encodeUrl(). */ + @Test public void positiveUrlValueVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlValueVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUrlValueVarTest"); invoke(); } @@ -102,7 +105,10 @@ public void positiveUrlValueVarTest() throws Exception { * @testStrategy: Validate the behavior of the scope attribute with respect to * var, both when scope is explicitly defined and when not defined. */ + @Test public void positiveUrlScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUrlScopeTest"); invoke(); } @@ -115,7 +121,10 @@ public void positiveUrlScopeTest() throws Exception { * @testStrategy: Validate that if the URL to be encoded contains special * characters, that they are not encoded by the action. */ + @Test public void positiveUrlNoCharEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlNoCharEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUrlNoCharEncodingTest"); invoke(); } @@ -128,7 +137,10 @@ public void positiveUrlNoCharEncodingTest() throws Exception { * @testStrategy: Validate the URL action can properly interact with nested * param subtags. */ + @Test public void positiveUrlParamsBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlParamsBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUrlParamsBodyTest"); invoke(); } @@ -141,7 +153,10 @@ public void positiveUrlParamsBodyTest() throws Exception { * @testStrategy: Validate that if an absolute URL is provided to the URL * action, the result is not rewritten. */ + @Test public void positiveUrlAbsUrlNotRewrittenTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUrlAbsUrlNotRewrittenTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUrlAbsUrlNotRewrittenTest"); invoke(); } @@ -154,7 +169,10 @@ public void positiveUrlAbsUrlNotRewrittenTest() throws Exception { * @testStrategy: Validate that an Exception is thrown if the body content of * the action causes an exception. */ + @Test public void negativeUrlExcBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUrlExcBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUrlExcBodyContentTest"); invoke(); } @@ -168,7 +186,10 @@ public void negativeUrlExcBodyContentTest() throws Exception { * context or url (when context is specified) doesn't begin with a leading * slash. */ + @Test public void negativeUrlContextUrlInvalidValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUrlContextUrlInvalidValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUrlContextUrlInvalidValueTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java similarity index 60% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java index 7429e43d3a..55f90272d9 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java @@ -14,56 +14,51 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ package com.sun.ts.tests.jstl.spec.etu.config; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_etu_config_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_etu_config_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_etu_config_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigStaticMemebersTest.jsp")), "positiveConfigStaticMemebersTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigGetSetRemoveSessionTest.jsp")), "positiveConfigGetSetRemoveSessionTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigGetSetRemoveRequestTest.jsp")), "positiveConfigGetSetRemoveRequestTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigGetSetRemovePageContextTest.jsp")), "positiveConfigGetSetRemovePageContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigGetSetRemoveApplicationTest.jsp")), "positiveConfigGetSetRemoveApplicationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveConfigFindTest.jsp")), "positiveConfigFindTest.jsp"); - setContextRoot("/jstl_etu_config_web"); - setGoldenFileDir("/jstl/spec/etu/config"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveConfigStaticMembersTest * @@ -73,7 +68,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that the public static member values of the * jakarta.servlet.jsp.jstl.core.Config class agree with the javadoc. */ + @Test public void positiveConfigStaticMembersTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveConfigStaticMemebersTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveConfigStaticMemebersTest"); invoke(); } @@ -91,7 +89,10 @@ public void positiveConfigStaticMembersTest() throws Exception { * validate that once the variables are removed, that additional calls to get * for the same variables, will return null. */ + @Test public void positiveConfigGetSetRemovePageContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveConfigGetSetRemovePageContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveConfigGetSetRemovePageContextTest"); invoke(); @@ -107,7 +108,10 @@ public void positiveConfigGetSetRemovePageContextTest() throws Exception { * removed, that additional calls to get for the same variable, will return * null. */ + @Test public void positiveConfigGetSetRemoveRequestTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveConfigGetSetRemoveRequestTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveConfigGetSetRemoveRequestTest"); invoke(); } @@ -122,6 +126,7 @@ public void positiveConfigGetSetRemoveRequestTest() throws Exception { * removed, that additional calls to get for the same variable, will return * null. */ + @Test public void positiveConfigGetSetRemoveSessionTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_config_web/positiveConfigGetSetRemoveSessionTest.jsp HTTP/1.0"); @@ -140,7 +145,10 @@ public void positiveConfigGetSetRemoveSessionTest() throws Exception { * removed, that additional calls to get for the same variable, will return * null. */ + @Test public void positiveConfigGetSetRemoveApplicationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveConfigGetSetRemoveApplicationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveConfigGetSetRemoveApplicationTest"); invoke(); @@ -157,7 +165,10 @@ public void positiveConfigGetSetRemoveApplicationTest() throws Exception { * method will attempt to find a context initialization parameter by the name * provided. */ + @Test public void positiveConfigFindTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveConfigFindTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveConfigFindTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java similarity index 75% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java index e14b71ab8b..d59540c6e4 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java @@ -14,54 +14,106 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * @(#)JSTLClient.java 1.4 03/21/03 - */ package com.sun.ts.tests.jstl.spec.etu.functions; -import java.io.PrintWriter; +import java.io.IOException; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public functions - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setContextRoot("/jstl_etu_func_web"); - setGoldenFileDir("/jstl/spec/etu/functions"); + } - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_etu_func_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_etu_func_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsTrimTest.jsp")), "functionsTrimTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsTrimNullStringTest.jsp")), "functionsTrimNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsToUpperCaseTest.jsp")), "functionsToUpperCaseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsToUpperCaseNullStringTest.jsp")), "functionsToUpperCaseNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsToLowerCaseTest.jsp")), "functionsToLowerCaseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsToLowerCaseNullStringTest.jsp")), "functionsToLowerCaseNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringTest.jsp")), "functionsSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringNullStringTest.jsp")), "functionsSubstringNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringNegativeEndIndexTest.jsp")), "functionsSubstringNegativeEndIndexTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringNegativeBeginIndexTest.jsp")), "functionsSubstringNegativeBeginIndexTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringEndIndexLTBeginIndexTest.jsp")), "functionsSubstringEndIndexLTBeginIndexTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringEndIndexGTStringLengthTest.jsp")), "functionsSubstringEndIndexGTStringLengthTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringBeginIndexGTLastIndexTest.jsp")), "functionsSubstringBeginIndexGTLastIndexTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringBeforeTest.jsp")), "functionsSubstringBeforeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringBeforeNullSubstringTest.jsp")), "functionsSubstringBeforeNullSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringBeforeNullStringTest.jsp")), "functionsSubstringBeforeNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringBeforeEmptySubstringTest.jsp")), "functionsSubstringBeforeEmptySubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringAfterTest.jsp")), "functionsSubstringAfterTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringAfterNullSubstringTest.jsp")), "functionsSubstringAfterNullSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringAfterNullStringTest.jsp")), "functionsSubstringAfterNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSubstringAfterEmptySubstringTest.jsp")), "functionsSubstringAfterEmptySubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsStartsWithTest.jsp")), "functionsStartsWithTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsStartsWithPrefixStringEqualTest.jsp")), "functionsStartsWithPrefixStringEqualTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsStartsWithNullStringTest.jsp")), "functionsStartsWithNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsStartsWithNullPrefixTest.jsp")), "functionsStartsWithNullPrefixTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsStartsWithEmptyPrefixStringTest.jsp")), "functionsStartsWithEmptyPrefixStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSplitTest.jsp")), "functionsSplitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSplitNullInputStringTest.jsp")), "functionsSplitNullInputStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSplitNullDelimiterTest.jsp")), "functionsSplitNullDelimiterTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSplitEmptyInputStringTest.jsp")), "functionsSplitEmptyInputStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsSplitEmptyDelimiterTest.jsp")), "functionsSplitEmptyDelimiterTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceTest.jsp")), "functionsReplaceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceNullInputStringTest.jsp")), "functionsReplaceNullInputStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceNullBeforeStringTest.jsp")), "functionsReplaceNullBeforeStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceNullAfterStringTest.jsp")), "functionsReplaceNullAfterStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceEmptyInputStringTest.jsp")), "functionsReplaceEmptyInputStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceEmptyBeforeStringTest.jsp")), "functionsReplaceEmptyBeforeStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsReplaceEmptyAfterStringTest.jsp")), "functionsReplaceEmptyAfterStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsLengthTest.jsp")), "functionsLengthTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsLengthNullInputTest.jsp")), "functionsLengthNullInputTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsLengthEmptyStringInputTest.jsp")), "functionsLengthEmptyStringInputTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsJoinTest.jsp")), "functionsJoinTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsJoinNullSeparatorTest.jsp")), "functionsJoinNullSeparatorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsJoinNullArrayTest.jsp")), "functionsJoinNullArrayTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsJoinEmptySeparatorTest.jsp")), "functionsJoinEmptySeparatorTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsIndexOfTest.jsp")), "functionsIndexOfTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsIndexOfNullSubstringTest.jsp")), "functionsIndexOfNullSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsIndexOfNullEmptyStringTest.jsp")), "functionsIndexOfNullEmptyStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsIndexOfEmptySubstringTest.jsp")), "functionsIndexOfEmptySubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEscapeXmlTest.jsp")), "functionsEscapeXmlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEscapeXmlNullStringTest.jsp")), "functionsEscapeXmlNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEndsWithTest.jsp")), "functionsEndsWithTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEndsWithSuffixStringEqualTest.jsp")), "functionsEndsWithSuffixStringEqualTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEndsWithNullSuffixTest.jsp")), "functionsEndsWithNullSuffixTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEndsWithNullStringTest.jsp")), "functionsEndsWithNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsEndsWithEmptySuffixStringTest.jsp")), "functionsEndsWithEmptySuffixStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsTest.jsp")), "functionsContainsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsStringSubstringEqualTest.jsp")), "functionsContainsStringSubstringEqualTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsNullSubstringTest.jsp")), "functionsContainsNullSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsNullStringTest.jsp")), "functionsContainsNullStringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsIgnoreCaseTest.jsp")), "functionsContainsIgnoreCaseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp")), "functionsContainsIgnoreCaseStringSubstringEqualTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsIgnoreCaseNullSubstringTest.jsp")), "functionsContainsIgnoreCaseNullSubstringTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/functionsContainsIgnoreCaseNullStringTest.jsp")), "functionsContainsIgnoreCaseNullStringTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -74,6 +126,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * true or false, depending on whether the provided substring is found in the * provided string value. */ + @Test public void functionsContainsTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsTest.jsp HTTP/1.1"); @@ -90,6 +143,7 @@ public void functionsContainsTest() throws Exception { * @test_Strategy: Validate that true is returned when both the 'string' and * 'substring' arguments are equal. */ + @Test public void functionsContainsStringSubstringEqualTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsStringSubstringEqualTest.jsp HTTP/1.1"); @@ -106,6 +160,7 @@ public void functionsContainsStringSubstringEqualTest() throws Exception { * @test_Strategy: Validate that false is returned if the 'string' argument is * provided a null value. */ + @Test public void functionsContainsNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsNullStringTest.jsp HTTP/1.1"); @@ -122,6 +177,7 @@ public void functionsContainsNullStringTest() throws Exception { * @test_Strategy: Validate that true is returned if the 'substring' argument * is provided a null value. */ + @Test public void functionsContainsNullSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsNullSubstringTest.jsp HTTP/1.1"); @@ -140,6 +196,7 @@ public void functionsContainsNullSubstringTest() throws Exception { * value, true or false, depending on whether the provided substring is found * in the provided string value. */ + @Test public void functionsContainsIgnoreCaseTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsIgnoreCaseTest.jsp HTTP/1.1"); @@ -156,6 +213,7 @@ public void functionsContainsIgnoreCaseTest() throws Exception { * @test_Strategy: Validate that true is returned when both the 'string' and * 'substring' arguments are equal. */ + @Test public void functionsContainsIgnoreCaseStringSubstringEqualTest() throws Exception { TEST_PROPS.setProperty(REQUEST, @@ -173,6 +231,7 @@ public void functionsContainsIgnoreCaseStringSubstringEqualTest() * @test_Strategy: Validate that false is returned if the 'string' argument is * provided a null value. */ + @Test public void functionsContainsIgnoreCaseNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsIgnoreCaseNullStringTest.jsp HTTP/1.1"); @@ -188,6 +247,7 @@ public void functionsContainsIgnoreCaseNullStringTest() throws Exception { * @test_Strategy: Validate that true is returned if the 'substring' argument * is provided a null value. */ + @Test public void functionsContainsIgnoreCaseNullSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsContainsIgnoreCaseNullSubstringTest.jsp HTTP/1.1"); @@ -203,6 +263,7 @@ public void functionsContainsIgnoreCaseNullSubstringTest() throws Exception { * @test_Strategy: Validate that escapeXml(String) escapes the characters * defined in section 4.2 of the JSTL specification. */ + @Test public void functionsEscapeXmlTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsEscapeXmlTest.jsp HTTP/1.1"); @@ -219,6 +280,7 @@ public void functionsEscapeXmlTest() throws Exception { * @test_Strategy: Validate that if escapeXml(String) is provided a null * value, an empty String is returned. */ + @Test public void functionsEscapeXmlNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsEscapeXmlNullStringTest.jsp HTTP/1.1"); @@ -236,6 +298,7 @@ public void functionsEscapeXmlNullStringTest() throws Exception { * @test_Strategy: Validate that indexOf(string, substring) returns the proper * index value when the substring is and is not found. */ + @Test public void functionsIndexOfTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsIndexOfTest.jsp HTTP/1.1"); @@ -252,6 +315,7 @@ public void functionsIndexOfTest() throws Exception { * @test_Strategy: Validate that -1 is returned by indexOf(string, substring) * when the 'string' argument is either null or empty. */ + @Test public void functionsIndexOfNullEmptyStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsIndexOfNullEmptyStringTest.jsp HTTP/1.1"); @@ -268,6 +332,7 @@ public void functionsIndexOfNullEmptyStringTest() throws Exception { * @test_Strategy: Validate that 0 is returned by indexOf(string, substring) * when the substring argument is null. */ + @Test public void functionsIndexOfNullSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsIndexOfNullSubstringTest.jsp HTTP/1.1"); @@ -284,6 +349,7 @@ public void functionsIndexOfNullSubstringTest() throws Exception { * @test_Strategy: Validate that 0 is returned by indexOf(string, substring) * when the substring argument is empty. */ + @Test public void functionsIndexOfEmptySubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsIndexOfEmptySubstringTest.jsp HTTP/1.1"); @@ -302,6 +368,7 @@ public void functionsIndexOfEmptySubstringTest() throws Exception { * Strings * */ + @Test public void functionsLengthTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsLengthTest.jsp HTTP/1.1"); @@ -319,6 +386,7 @@ public void functionsLengthTest() throws Exception { * @test_Strategy: Validate that if a null input value is provided to * length(index) the function returns 0. */ + @Test public void functionsLengthNullInputTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsLengthNullInputTest.jsp HTTP/1.1"); @@ -335,6 +403,7 @@ public void functionsLengthNullInputTest() throws Exception { * @test_Strategy: Validate that if a an empty string is provided as input to * the length(input) function, 0 is returned. */ + @Test public void functionsLengthEmptyStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web/functionsLengthEmptyStringInputTest.jsp HTTP/1.1"); @@ -352,6 +421,7 @@ public void functionsLengthEmptyStringTest() throws Exception { * @test_Strategy: Validate that startsWith returns the expected values based * on the input values. */ + @Test public void functionsStartsWithTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsStartsWithTest.jsp HTTP/1.1"); @@ -368,6 +438,7 @@ public void functionsStartsWithTest() throws Exception { * @test_Strategy: Validate that true is returned if the prefix provided is * null. */ + @Test public void functionsStartsWithNullPrefixTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsStartsWithNullPrefixTest.jsp HTTP/1.1"); @@ -384,6 +455,7 @@ public void functionsStartsWithNullPrefixTest() throws Exception { * @test_Strategy: Validate that false is returned if the input string * provided is null. */ + @Test public void functionsStartsWithNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsStartsWithNullStringTest.jsp HTTP/1.1"); @@ -400,6 +472,7 @@ public void functionsStartsWithNullStringTest() throws Exception { * @test_Strategy: Validate that true is returned when the prefix is an empty * String. */ + @Test public void functionsStartsWithEmptyPrefixTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsStartsWithEmptyPrefixStringTest.jsp HTTP/1.1"); @@ -416,6 +489,7 @@ public void functionsStartsWithEmptyPrefixTest() throws Exception { * @test_Strategy: Validate that true is returned when the input string and * the prefix are equal. */ + @Test public void functionsStartsWithPrefixStringEqualTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsStartsWithPrefixStringEqualTest.jsp HTTP/1.1"); @@ -433,6 +507,7 @@ public void functionsStartsWithPrefixStringEqualTest() throws Exception { * @test_Strategy: Validate that endsWith returns the expected values based on * the input values. */ + @Test public void functionsEndsWithTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsEndsWithTest.jsp HTTP/1.1"); @@ -449,6 +524,7 @@ public void functionsEndsWithTest() throws Exception { * @test_Strategy: Validate that true is returned if the suffix provided is * null. */ + @Test public void functionsEndsWithNullSuffixTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsEndsWithNullSuffixTest.jsp HTTP/1.1"); @@ -465,6 +541,7 @@ public void functionsEndsWithNullSuffixTest() throws Exception { * @test_Strategy: Validate that false is returned if the input string * provided is null. */ + @Test public void functionsEndsWithNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsEndsWithNullStringTest.jsp HTTP/1.1"); @@ -481,6 +558,7 @@ public void functionsEndsWithNullStringTest() throws Exception { * @test_Strategy: Validate that true is returned when the suffix is an empty * String. */ + @Test public void functionsEndsWithEmptySuffixTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsEndsWithEmptySuffixStringTest.jsp HTTP/1.1"); @@ -497,6 +575,7 @@ public void functionsEndsWithEmptySuffixTest() throws Exception { * @test_Strategy: Validate that true is returned when the input string and * the suffix are equal. */ + @Test public void functionsEndsWithSuffixStringEqualTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsEndsWithSuffixStringEqualTest.jsp HTTP/1.1"); @@ -513,6 +592,7 @@ public void functionsEndsWithSuffixStringEqualTest() throws Exception { * * @test_Strategy: Validate the return value of the substring function. */ + @Test public void functionsSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringTest.jsp HTTP/1.1"); @@ -529,6 +609,7 @@ public void functionsSubstringTest() throws Exception { * @test_Strategy: Validate that if a null string is provided to the * substring() function, an empty string is returned. */ + @Test public void functionsSubstringNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringNullStringTest.jsp HTTP/1.1"); @@ -545,6 +626,7 @@ public void functionsSubstringNullStringTest() throws Exception { * @test_Strategy: Validate that if value less than zero is provided as the * begin index, the begin index will be considered as zero. */ + @Test public void functionsSubstringNegativeBeginIndexTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringNegativeBeginIndexTest.jsp HTTP/1.1"); @@ -561,6 +643,7 @@ public void functionsSubstringNegativeBeginIndexTest() throws Exception { * @test_Strategy: Validate that an end index less than zero will be converted * to the length of the input string. */ + @Test public void functionsSubstringNegativeEndIndexTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringNegativeEndIndexTest.jsp HTTP/1.1"); @@ -577,6 +660,7 @@ public void functionsSubstringNegativeEndIndexTest() throws Exception { * @test_Strategy: Validate that an end index that is greater than the length * of the input string will be 'adjusted' to be the length of the string. */ + @Test public void functionsSubstringEndIndexGTStringLengthTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringEndIndexGTStringLengthTest.jsp HTTP/1.1"); @@ -593,6 +677,7 @@ public void functionsSubstringEndIndexGTStringLengthTest() throws Exception { * @test_Strategy: Validate an emtpy string is returned when the begin index * is greater than the last index of the string. */ + @Test public void functionsSubstringBeginIndexGTLastIndexTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringBeginIndexGTLastIndexTest.jsp HTTP/1.1"); @@ -609,6 +694,7 @@ public void functionsSubstringBeginIndexGTLastIndexTest() throws Exception { * @test_Strategy: Validate that an end index that is less than the begin * index results in the function returning an emtpy string. */ + @Test public void functionsSubstringEndIndexLTBeginIndexTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringEndIndexLTBeginIndexTest.jsp HTTP/1.1"); @@ -626,6 +712,7 @@ public void functionsSubstringEndIndexLTBeginIndexTest() throws Exception { * @test_Strategy: Validate the proper behavior of substringAfter() with valid * input values(when the substring is found and when it is not). */ + @Test public void functionsSubstringAfterTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringAfterTest.jsp HTTP/1.1"); @@ -642,6 +729,7 @@ public void functionsSubstringAfterTest() throws Exception { * @test_Strategy: Validate a null input string will result in an empty string * returned. */ + @Test public void functionsSubstringAfterNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringAfterNullStringTest.jsp HTTP/1.1"); @@ -658,6 +746,7 @@ public void functionsSubstringAfterNullStringTest() throws Exception { * @test_Strategy: Validate a null substring will result in the input string * being returned. */ + @Test public void functionsSubstringAfterNullSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringAfterNullSubstringTest.jsp HTTP/1.1"); @@ -674,6 +763,7 @@ public void functionsSubstringAfterNullSubstringTest() throws Exception { * @test_Strategy: Validate an empty substring will result in the input string * being returned. */ + @Test public void functionsSubstringAfterEmptySubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringAfterEmptySubstringTest.jsp HTTP/1.1"); @@ -691,6 +781,7 @@ public void functionsSubstringAfterEmptySubstringTest() throws Exception { * @test_Strategy: Validate the proper behavior of substringBefore() with * valid input values(when the substring is found and when it is not). */ + @Test public void functionsSubstringBeforeTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringBeforeTest.jsp HTTP/1.1"); @@ -707,6 +798,7 @@ public void functionsSubstringBeforeTest() throws Exception { * @test_Strategy: Validate a null input string will result in an empty string * returned. */ + @Test public void functionsSubstringBeforeNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringBeforeNullStringTest.jsp HTTP/1.1"); @@ -723,6 +815,7 @@ public void functionsSubstringBeforeNullStringTest() throws Exception { * @test_Strategy: Validate a null substring will result in the input string * being returned. */ + @Test public void functionsSubstringBeforeNullSubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringBeforeNullSubstringTest.jsp HTTP/1.1"); @@ -739,6 +832,7 @@ public void functionsSubstringBeforeNullSubstringTest() throws Exception { * @test_Strategy: Validate an empty substring will result in the input string * being returned. */ + @Test public void functionsSubstringBeforeEmptySubstringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSubstringBeforeEmptySubstringTest.jsp HTTP/1.1"); @@ -755,6 +849,7 @@ public void functionsSubstringBeforeEmptySubstringTest() throws Exception { * @test_Strategy: Validate the toLowerCase function will lower case the * provided input string. */ + @Test public void functionsToLowerCaseTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsToLowerCaseTest.jsp HTTP/1.1"); @@ -771,6 +866,7 @@ public void functionsToLowerCaseTest() throws Exception { * @test_Strategy: Validate the toLowerCase function returns an empty string * if a null string was provided as the input value. */ + @Test public void functionsToLowerCaseNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsToLowerCaseNullStringTest.jsp HTTP/1.1"); @@ -787,6 +883,7 @@ public void functionsToLowerCaseNullStringTest() throws Exception { * @test_Strategy: Validate the toUpperCase function will lower case the * provided input string. */ + @Test public void functionsToUpperCaseTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsToUpperCaseTest.jsp HTTP/1.1"); @@ -803,6 +900,7 @@ public void functionsToUpperCaseTest() throws Exception { * @test_Strategy: Validate the toUpperCase function returns an empty string * if an empty string was provided as the input value. */ + @Test public void functionsToUpperCaseNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsToUpperCaseNullStringTest.jsp HTTP/1.1"); @@ -819,6 +917,7 @@ public void functionsToUpperCaseNullStringTest() throws Exception { * @test_Strategy: Validate the behavior of the trim function. Leading and * trailing whitespace must be removed from the result. */ + @Test public void functionsTrimTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsTrimTest.jsp HTTP/1.1"); @@ -835,6 +934,7 @@ public void functionsTrimTest() throws Exception { * @test_Strategy: Validate an empty string is returned if the input string is * empty. */ + @Test public void functionsTrimNullStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsTrimNullStringTest.jsp HTTP/1.1"); @@ -852,6 +952,7 @@ public void functionsTrimNullStringTest() throws Exception { * @test_Strategy: Validate the join(String[], String) function properly joins * the elements of the String array using the specified separator. */ + @Test public void functionsJoinTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsJoinTest.jsp HTTP/1.1"); @@ -868,6 +969,7 @@ public void functionsJoinTest() throws Exception { * @test_Strategy: Validate an empty string is returned in the case a null * value is provided to the array argument. */ + @Test public void functionsJoinNullArrayTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsJoinNullArrayTest.jsp HTTP/1.1"); @@ -884,6 +986,7 @@ public void functionsJoinNullArrayTest() throws Exception { * @test_Strategy: Validate no separator is used if the value provided to the * separator argument is null. */ + @Test public void functionsJoinNullSeparatorTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsJoinNullSeparatorTest.jsp HTTP/1.1"); @@ -900,6 +1003,7 @@ public void functionsJoinNullSeparatorTest() throws Exception { * @test_Strategy: Validate no separator is used if the value provided to the * separator argument is an empty String. */ + @Test public void functionsJoinEmptySeparatorTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsJoinEmptySeparatorTest.jsp HTTP/1.1"); @@ -919,6 +1023,7 @@ public void functionsJoinEmptySeparatorTest() throws Exception { * beforeString will be replaced with the afterString. - if the beforeString * is not found, the inputString is returned. */ + @Test public void functionsReplaceTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceTest.jsp HTTP/1.1"); @@ -935,6 +1040,7 @@ public void functionsReplaceTest() throws Exception { * @test_Strategy: Validate an empty String is returned by the replace * function if a null inputString is provided. */ + @Test public void functionsReplaceNullInputStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceNullInputStringTest.jsp HTTP/1.1"); @@ -951,6 +1057,7 @@ public void functionsReplaceNullInputStringTest() throws Exception { * @test_Strategy: Validate an empty String is returned by the replace * function if an empty inputString is provided. */ + @Test public void functionsReplaceEmptyInputStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceEmptyInputStringTest.jsp HTTP/1.1"); @@ -967,6 +1074,7 @@ public void functionsReplaceEmptyInputStringTest() throws Exception { * @test_Strategy: Validate the inputString is returned if the beforeString is * null. */ + @Test public void functionsReplaceNullBeforeStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceNullBeforeStringTest.jsp HTTP/1.1"); @@ -983,6 +1091,7 @@ public void functionsReplaceNullBeforeStringTest() throws Exception { * @test_Strategy: Validate the inputString is returned if the beforeString is * empty. */ + @Test public void functionsReplaceEmptyBeforeStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceEmptyBeforeStringTest.jsp HTTP/1.1"); @@ -999,6 +1108,7 @@ public void functionsReplaceEmptyBeforeStringTest() throws Exception { * @test_Strategy: Validate all occurrences of beforeString are removed from * the inputString if the afterString value is null. */ + @Test public void functionsReplaceNullAfterStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceNullAfterStringTest.jsp HTTP/1.1"); @@ -1015,6 +1125,7 @@ public void functionsReplaceNullAfterStringTest() throws Exception { * @test_Strategy: Validate all occurrences of beforeString are removed from * the inputString if the afterString value is an empty string. */ + @Test public void functionsReplaceEmptyAfterStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsReplaceEmptyAfterStringTest.jsp HTTP/1.1"); @@ -1033,6 +1144,7 @@ public void functionsReplaceEmptyAfterStringTest() throws Exception { * from an input string with a designated delimiter. The delimiter will not * appear in any of the tokens returned. */ + @Test public void functionsSplitTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSplitTest.jsp HTTP/1.1"); @@ -1050,6 +1162,7 @@ public void functionsSplitTest() throws Exception { * empty string as that element's value is returned if the inputString is * null. */ + @Test public void functionsSplitNullInputStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSplitNullInputStringTest.jsp HTTP/1.1"); @@ -1067,6 +1180,7 @@ public void functionsSplitNullInputStringTest() throws Exception { * empty string as that element's value is returned if the inputString is * empty. */ + @Test public void functionsSplitEmptyInputStringTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSplitEmptyInputStringTest.jsp HTTP/1.1"); @@ -1084,6 +1198,7 @@ public void functionsSplitEmptyInputStringTest() throws Exception { * inputString as that element's value is returned if the delimiter specified * is null. */ + @Test public void functionsSplitNullDelimiterTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSplitNullDelimiterTest.jsp HTTP/1.1"); @@ -1101,6 +1216,7 @@ public void functionsSplitNullDelimiterTest() throws Exception { * inputString as that element's value is returned if the delimiter specified * is empty. */ + @Test public void functionsSplitEmptyDelimiterTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_etu_func_web//functionsSplitEmptyDelimiterTest.jsp HTTP/1.1"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java similarity index 63% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java index 3394357e1d..aaddae1a12 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java @@ -14,54 +14,43 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ package com.sun.ts.tests.jstl.spec.etu.tlv.permitted; -import java.io.PrintWriter; +import java.io.IOException; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + /** Creates new JSTLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_etu_tlv_perm_web"); } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - setContextRoot("/jstl_etu_tlv_perm_web"); - setGoldenFileDir("/jstl/spec/etu/tlv/permitted"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_etu_tlv_perm_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_etu_tlv_perm_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativePermittedTlvTest.jsp")), "negativePermittedTlvTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePermittedTlvTest.jsp")), "positivePermittedTlvTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -74,6 +63,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * libraries is specified as a parameter to the PermittedTaglibsTLV, that the * use of this library doesn't generate a translation error. */ + @Test public void positivePermittedTlvTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positivePermittedTlvTest"); TEST_PROPS.setProperty(REQUEST, "positivePermittedTlvTest.jsp"); @@ -90,6 +80,7 @@ public void positivePermittedTlvTest() throws Exception { * libraries is not specified as a parameter to the PermittedTaglibsTLV, that * the use of this library generates a translation error. */ + @Test public void negativePermittedTlvTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativePermittedTlvTest"); TEST_PROPS.setProperty(REQUEST, "negativePermittedTlvTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java similarity index 69% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java index 6abfda7c67..5d9088f0f5 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java @@ -14,54 +14,48 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ package com.sun.ts.tests.jstl.spec.etu.tlv.scrfree; -import java.io.PrintWriter; - -import com.sun.javatest.Status; +import java.io.IOException; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_etu_tlv_scrfree_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_etu_tlv_scrfree_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_etu_tlv_scrfree_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_etu_tlv_scrfree_web"); - setGoldenFileDir("/jstl/spec/etu/tlv/scrfree"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeScriptFreeTlvNoDeclTest.jsp")), "negativeScriptFreeTlvNoDeclTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeScriptFreeTlvNoExprTest.jsp")), "negativeScriptFreeTlvNoExprTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeScriptFreeTlvNoRTExprTest.jsp")), "negativeScriptFreeTlvNoRTExprTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeScriptFreeTlvNoScrTest.jsp")), "negativeScriptFreeTlvNoScrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScriptFreeTlvNoDeclTest.jsp")), "positiveScriptFreeTlvNoDeclTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScriptFreeTlvNoExprTest.jsp")), "positiveScriptFreeTlvNoExprTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScriptFreeTlvNoRTExprTest.jsp")), "positiveScriptFreeTlvNoRTExprTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScriptFreeTlvNoScrTest.jsp")), "positiveScriptFreeTlvNoScrTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,6 +67,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * aren't allowed, that scriptlets, expressions and RT expressions still work * as expected. */ + @Test public void positiveScriptFreeTlvNoDeclTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveScriptFreeTlvNoDeclTest"); TEST_PROPS.setProperty(REQUEST, "positiveScriptFreeTlvNoDeclTest.jsp"); @@ -89,6 +84,7 @@ public void positiveScriptFreeTlvNoDeclTest() throws Exception { * aren't allowed, that declarations, expressions and RT expressions still * work as expected. */ + @Test public void positiveScriptFreeTlvNoScrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveScriptFreeTlvNoScrTest"); TEST_PROPS.setProperty(REQUEST, "positiveScriptFreeTlvNoScrTest.jsp"); @@ -105,6 +101,7 @@ public void positiveScriptFreeTlvNoScrTest() throws Exception { * aren't allowed, that scriptlets, declarations and RT expressions still work * as expected. */ + @Test public void positiveScriptFreeTlvNoExprTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveScriptFreeTlvNoExprTest"); TEST_PROPS.setProperty(REQUEST, "positiveScriptFreeTlvNoExprTest.jsp"); @@ -121,6 +118,7 @@ public void positiveScriptFreeTlvNoExprTest() throws Exception { * aren't allowed, that declarations, scriptlets, and expressions still work * as expected. */ + @Test public void positiveScriptFreeTlvNoRTExprTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveScriptFreeTlvNoRTExprTest"); TEST_PROPS.setProperty(REQUEST, "positiveScriptFreeTlvNoRTExprTest.jsp"); @@ -137,6 +135,7 @@ public void positiveScriptFreeTlvNoRTExprTest() throws Exception { * configured validator, that a translation error occurs if a declaration * exists. */ + @Test public void negativeScriptFreeTlvNoDeclTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeScriptFreeTlvNoDeclTest"); TEST_PROPS.setProperty(REQUEST, "negativeScriptFreeTlvNoDeclTest.jsp"); @@ -153,6 +152,7 @@ public void negativeScriptFreeTlvNoDeclTest() throws Exception { * configured validator, that a translation error occurs if a scriptlet * exists. */ + @Test public void negativeScriptFreeTlvNoScrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeScriptFreeTlvNoScrTest"); TEST_PROPS.setProperty(REQUEST, "negativeScriptFreeTlvNoScrTest.jsp"); @@ -169,6 +169,7 @@ public void negativeScriptFreeTlvNoScrTest() throws Exception { * configured validator, that a translation error occurs if an expression * exists. */ + @Test public void negativeScriptFreeTlvNoExprTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeScriptFreeTlvNoExprTest"); TEST_PROPS.setProperty(REQUEST, "negativeScriptFreeTlvNoExprTest.jsp"); @@ -185,6 +186,7 @@ public void negativeScriptFreeTlvNoExprTest() throws Exception { * configured validator, that a translation error occurs if an RT expression * exists. */ + @Test public void negativeScriptFreeTlvNoRTExprTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeScriptFreeTlvNoRTExprTest"); TEST_PROPS.setProperty(REQUEST, "negativeScriptFreeTlvNoRTExprTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java similarity index 58% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java index 1e08c4d8ec..f1f8ba5040 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java @@ -14,53 +14,41 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ package com.sun.ts.tests.jstl.spec.etu.uri; -import java.io.PrintWriter; +import java.io.IOException; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new URLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + /** Creates new URLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_etu_uri_web"); } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - setContextRoot("/jstl_etu_uri_web"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_etu_uri_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_etu_uri_web.xml")); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveJSTLURITest.jsp")), "positiveJSTLURITest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,6 +61,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * tags. If defined correctly, a fatal translation error should not occur ( * per section 7.3.6.2 of the JavaServer Pages 1.2 Specification. */ + @Test public void positiveJSTLURITest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveJSTLURITest"); TEST_PROPS.setProperty(REQUEST, "positiveJSTLURITest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java index b87fa8ec6f..8090b38cb4 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java @@ -14,56 +14,60 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.format.fmtdate; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_fmtdate_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_fmtdate_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_fmtdate_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFDScopeNoVarTest.jsp")), "negativeFDScopeNoVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDDateStyleTest.jsp")), "positiveFDDateStyleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDFallbackLocaleTest.jsp")), "positiveFDFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDLocalizationContextTest.jsp")), "positiveFDLocalizationContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDPatternTest.jsp")), "positiveFDPatternTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDScopeTest.jsp")), "positiveFDScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDTimeStyleTest.jsp")), "positiveFDTimeStyleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDTimeZoneNullEmptyTest.jsp")), "positiveFDTimeZoneNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDTimeZonePrecedenceTest.jsp")), "positiveFDTimeZonePrecedenceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDTimeZoneTest.jsp")), "positiveFDTimeZoneTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDTypeTest.jsp")), "positiveFDTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDValueNullTest.jsp")), "positiveFDValueNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDValueTest.jsp")), "positiveFDValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFDVarTest.jsp")), "positiveFDVarTest.jsp"); - setContextRoot("/jstl_fmt_fmtdate_web"); - setGoldenFileDir("/jstl/spec/fmt/format/fmtdate"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveFDValueTest * @@ -73,7 +77,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that formatDate action can properly format dates * provided as String literals or as java.util.Date objects. */ + @Test public void positiveFDValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDValueTest"); invoke(); } @@ -88,7 +95,10 @@ public void positiveFDValueTest() throws Exception { * date will be formatted. - The value is properly formatted when explicity * using time, date, or both. */ + @Test public void positiveFDTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDTypeTest"); invoke(); } @@ -103,7 +113,10 @@ public void positiveFDTypeTest() throws Exception { * dateStyle is not present, the default value for dateStyle, default, will be * applied when type is not specified, or is set to date or both. */ + @Test public void positiveFDDateStyleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDDateStyleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDDateStyleTest"); invoke(); } @@ -118,7 +131,10 @@ public void positiveFDDateStyleTest() throws Exception { * present, the default value for timeStyle, default, will be applied when * type is set to time or both. */ + @Test public void positiveFDTimeStyleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDTimeStyleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDTimeStyleTest"); invoke(); } @@ -131,7 +147,10 @@ public void positiveFDTimeStyleTest() throws Exception { * @testStragegy: Validate that if pattern is present, it is properly applied * to the date value provided. */ + @Test public void positiveFDPatternTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDPatternTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDPatternTest"); invoke(); } @@ -145,7 +164,10 @@ public void positiveFDPatternTest() throws Exception { * String literals representing a time zone, as well as java.util.TimeZone * objects. */ + @Test public void positiveFDTimeZoneTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDTimeZoneTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDTimeZoneTest"); invoke(); } @@ -159,7 +181,10 @@ public void positiveFDTimeZoneTest() throws Exception { * is not written to the current JspWriter, but is instead availabe via the * PageContext and is of type String (validation performed via custom action). */ + @Test public void positiveFDVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDVarTest"); invoke(); } @@ -174,7 +199,10 @@ public void positiveFDVarTest() throws Exception { * specified by the scope attribute. Also verify that if scope is not present, * that var is exported to the page scope by default. */ + @Test public void positiveFDScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDScopeTest"); invoke(); } @@ -188,7 +216,10 @@ public void positiveFDScopeTest() throws Exception { * specified, the scoped variable referenced by var is removed. If var, or * scope and var is not specified, no action occurs. */ + @Test public void positiveFDValueNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDValueNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDValueNullTest"); invoke(); } @@ -202,7 +233,10 @@ public void positiveFDValueNullTest() throws Exception { * be formatted as if it was present. In this case, the time will be formatted * using the page's time zone of EST. */ + @Test public void positiveFDTimeZoneNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDTimeZoneNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDTimeZoneNullEmptyTest"); invoke(); } @@ -219,7 +253,10 @@ public void positiveFDTimeZoneNullEmptyTest() throws Exception { * attribute present, and not wrapped by the fmt:setTimeZone action, use the * value of the scoped attribute jakarta.servlet.jsp.jstl.fmt.timeZone */ + @Test public void positiveFDTimeZonePrecedenceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDTimeZonePrecedenceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFDTimeZonePrecedenceTest"); invoke(); } @@ -233,10 +270,13 @@ public void positiveFDTimeZonePrecedenceTest() throws Exception { * the default I18N localization context configuration variable * jakarta.servlet.jsp.jstl.fmt.localizationContext. */ + @Test public void positiveFDLocalizationContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDLocalizationContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFDLocalizationContextTest"); TEST_PROPS.setProperty(REQUEST, "positiveFDLocalizationContextTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveFDLocalizationContextTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveFDLocalizationContextTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -249,10 +289,13 @@ public void positiveFDLocalizationContextTest() throws Exception { * @testStrategy: Validate that if no matching locale can be found, that the * fallback locale will be used. */ + @Test public void positiveFDFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFDFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFDFallbackLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positiveFDFallbackLocaleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveFDFallbackLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveFDFallbackLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: xx-XX"); invoke(); } @@ -265,6 +308,7 @@ public void positiveFDFallbackLocaleTest() throws Exception { * @testStrategy: validate that if var is not specified, but scope is, that a * fatal translation error occurs. */ + @Test public void negativeFDScopeNoVarTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeFDScopeNoVarTest"); TEST_PROPS.setProperty(REQUEST, "negativeFDScopeNoVarTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java index ef5e9e4768..489d7d111a 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java @@ -14,54 +14,62 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.format.fmtnum; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_fmtnum_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_fmtnum_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_fmtnum_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNVarTest.jsp")), "positiveFNVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNValueTest.jsp")), "positiveFNValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNValueNullEmptyTest.jsp")), "positiveFNValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNTypeTest.jsp")), "positiveFNTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNScopeTest.jsp")), "positiveFNScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNPatternTest.jsp")), "positiveFNPatternTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNMinIntDigitsTest.jsp")), "positiveFNMinIntDigitsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNMinFracDigitsTest.jsp")), "positiveFNMinFracDigitsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNMaxIntDigitsTest.jsp")), "positiveFNMaxIntDigitsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNMaxFracDigitsTest.jsp")), "positiveFNMaxFracDigitsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNLocalizationContextTest.jsp")), "positiveFNLocalizationContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNGroupingUsedTest.jsp")), "positiveFNGroupingUsedTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNFallbackLocaleTest.jsp")), "positiveFNFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNCurrencySymbolTest.jsp")), "positiveFNCurrencySymbolTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNCurrencyCodeTest.jsp")), "positiveFNCurrencyCodeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNCodeSymbolTest.jsp")), "positiveFNCodeSymbolTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFNBodyValueTest.jsp")), "positiveFNBodyValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFNUnableToParseValueTest.jsp")), "negativeFNUnableToParseValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFNScopeNoVarTest.jsp")), "negativeFNScopeNoVarTest.jsp"); - setContextRoot("/jstl_fmt_fmtnum_web"); - setGoldenFileDir("/jstl/spec/fmt/format/fmtnum"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +80,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate the value attribute can accept both String and * Number instances as well as the acceptance of dynamic and static values. */ + @Test public void positiveFNValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNValueTest"); invoke(); } @@ -87,7 +98,10 @@ public void positiveFNValueTest() throws Exception { * affects the formatting of the value. Also validate that if type is not * specified, that the value will be formatted as a number by default. */ + @Test public void positiveFNTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNTypeTest"); invoke(); } @@ -100,7 +114,10 @@ public void positiveFNTypeTest() throws Exception { * @testStrategy: Validate that a pattern is properly applied when formatting * numbers. Also validate that if pattern is specified, that type is ignored. */ + @Test public void positiveFNPatternTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNPatternTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNPatternTest"); invoke(); } @@ -114,7 +131,10 @@ public void positiveFNPatternTest() throws Exception { * value when type is currency. If type is not currency, then currencySymbol * should not be applied. */ + @Test public void positiveFNCurrencySymbolTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNCurrencySymbolTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNCurrencySymbolTest"); invoke(); } @@ -128,7 +148,10 @@ public void positiveFNCurrencySymbolTest() throws Exception { * value to be formatted when type is currency. If type is not currency, then * currencyCode should not be applied. */ + @Test public void positiveFNCurrencyCodeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNCurrencyCodeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNCurrencyCodeTest"); invoke(); } @@ -143,7 +166,10 @@ public void positiveFNCurrencyCodeTest() throws Exception { * percent). If groupingUsed is not specified, groupings will be applied to * the value by default. */ + @Test public void positiveFNGroupingUsedTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNGroupingUsedTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNGroupingUsedTest"); invoke(); } @@ -159,7 +185,10 @@ public void positiveFNGroupingUsedTest() throws Exception { * the number of integer digits exceeds value of the maxIntegerDigits * attribute. */ + @Test public void positiveFNMaxIntDigitsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNMaxIntDigitsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNMaxIntDigitsTest"); invoke(); } @@ -174,7 +203,10 @@ public void positiveFNMaxIntDigitsTest() throws Exception { * should enforce the minimum number of digits in the final result of the * format operation. */ + @Test public void positiveFNMinIntDigitsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNMinIntDigitsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNMinIntDigitsTest"); invoke(); } @@ -187,7 +219,10 @@ public void positiveFNMinIntDigitsTest() throws Exception { * @testStrategy: fractional digits exceeds value of the maxIntegerDigits * attribute. */ + @Test public void positiveFNMaxFracDigitsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNMaxFracDigitsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNMaxFracDigitsTest"); invoke(); } @@ -202,7 +237,10 @@ public void positiveFNMaxFracDigitsTest() throws Exception { * should enforce the minimum number of fractional digits in the final result * of the format operation. */ + @Test public void positiveFNMinFracDigitsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNMinFracDigitsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNMinFracDigitsTest"); invoke(); } @@ -216,7 +254,10 @@ public void positiveFNMinFracDigitsTest() throws Exception { * result and can be referenced by the variable name specified by var. Also * validate that the type of the scoped variable is java.lang.String. */ + @Test public void positiveFNVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNVarTest"); invoke(); } @@ -230,7 +271,10 @@ public void positiveFNVarTest() throws Exception { * as well as validating that if scope is not specified, var will be exported * to the page scope by default. */ + @Test public void positiveFNScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNScopeTest"); invoke(); } @@ -243,7 +287,10 @@ public void positiveFNScopeTest() throws Exception { * @testStrategy: Validate that if the value attribute is provided with a null * or empty value, that no action is performed. */ + @Test public void positiveFNValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNValueNullEmptyTest"); invoke(); } @@ -256,7 +303,10 @@ public void positiveFNValueNullEmptyTest() throws Exception { * @testStrategy: Validate that the value to be formatted can be provided as * body content to the action. */ + @Test public void positiveFNBodyValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNBodyValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNBodyValueTest"); invoke(); } @@ -273,7 +323,10 @@ public void positiveFNBodyValueTest() throws Exception { * currencySymbol will take precedence over currencyCode. In this case USD * should prefix the formatted value. */ + @Test public void positiveFNCodeSymbolTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNCodeSymbolTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveFNCodeSymbolTest"); invoke(); } @@ -287,7 +340,10 @@ public void positiveFNCodeSymbolTest() throws Exception { * the default I18N localization context configuration variable * jakarta.servlet.jsp.jstl.fmt.localizationContext. */ + @Test public void positiveFNLocalizationContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNLocalizationContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFNLocalizationContextTest"); TEST_PROPS.setProperty(REQUEST, "positiveFNLocalizationContextTest.jsp"); TEST_PROPS.setProperty(GOLDENFILE, "positiveFNLocalizationContextTest.gf"); @@ -303,7 +359,10 @@ public void positiveFNLocalizationContextTest() throws Exception { * @testStrategy: Validate that if no matching locale can be found, that the * fallback locale will be used. */ + @Test public void positiveFNFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFNFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFNFallbackLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positiveFNFallbackLocaleTest.jsp"); TEST_PROPS.setProperty(GOLDENFILE, "positiveFNFallbackLocaleTest.gf"); @@ -321,7 +380,10 @@ public void positiveFNFallbackLocaleTest() throws Exception { * with the rethrown unparsable value in the exception text and the original * exception set as the root cause of the JspException. */ + @Test public void negativeFNUnableToParseValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeFNUnableToParseValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeFNUnableToParseValueTest"); invoke(); } @@ -334,6 +396,7 @@ public void negativeFNUnableToParseValueTest() throws Exception { * @testStrategy: validate that if var is not specified, but scope is, that a * fatal translation error occurs. */ + @Test public void negativeFNScopeNoVarTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeFNScopeNoVarTest"); TEST_PROPS.setProperty(REQUEST, "negativeFNScopeNoVarTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java similarity index 61% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java index d20d9535e0..3353e4816b 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java @@ -14,54 +14,47 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.format.localecontext; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_locctx_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_locctx_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_locctx_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFormatLocalizationContextBrowserLocaleTest.jsp")), "positiveFormatLocalizationContextBrowserLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFormatLocalizationContextBundleTest.jsp")), "positiveFormatLocalizationContextBundleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFormatLocalizationContextI18NTest.jsp")), "positiveFormatLocalizationContextI18NTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveFormatLocalizationContextLocaleTest.jsp")), "positiveFormatLocalizationContextLocaleTest.jsp"); - setContextRoot("/jstl_fmt_locctx_web"); - setGoldenFileDir("/jstl/spec/fmt/format/localecontext"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -78,13 +71,16 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * so the resulting locale will be en_US. If the action chooses the proper * locale, no parse exception will occur. */ + @Test public void positiveFormatLocalizationContextBundleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFormatLocalizationContextBundleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFormatLocalizationContextBundleTest"); TEST_PROPS.setProperty(REQUEST, "positiveFormatLocalizationContextBundleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveFormatLocalizationContextBundleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveFormatLocalizationContextBundleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -103,13 +99,16 @@ public void positiveFormatLocalizationContextBundleTest() throws Exception { * action correctly uses the locale from the basename attribute, then no parse * exception will occur. */ + @Test public void positiveFormatLocalizationContextI18NTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFormatLocalizationContextI18NTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFormatLocalizationContextI18NTest"); TEST_PROPS.setProperty(REQUEST, "positiveFormatLocalizationContextI18NTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveFormatLocalizationContextI18NTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveFormatLocalizationContextI18NTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -126,13 +125,16 @@ public void positiveFormatLocalizationContextI18NTest() throws Exception { * preferred locale to de_DE. If the locale attribute is used, no parse * exception will occur. */ + @Test public void positiveFormatLocalizationContextLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFormatLocalizationContextLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFormatLocalizationContextLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positiveFormatLocalizationContextLocaleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveFormatLocalizationContextLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveFormatLocalizationContextLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: de-DE"); invoke(); } @@ -148,14 +150,17 @@ public void positiveFormatLocalizationContextLocaleTest() throws Exception { * will be based on the preferred locales provided by the client (via the * Accept-Language request header). */ + @Test public void positiveFormatLocalizationContextBrowserLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveFormatLocalizationContextBrowserLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveFormatLocalizationContextBrowserLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positiveFormatLocalizationContextBrowserLocaleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveFormatLocalizationContextBrowserLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveFormatLocalizationContextBrowserLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java similarity index 63% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java index 19c4da6b14..f67e7f3c8a 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java @@ -20,48 +20,57 @@ package com.sun.ts.tests.jstl.spec.fmt.format.parsedate; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_psdate_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_psdate_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_psdate_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativePDScopeNoVarTest.jsp")), "negativePDScopeNoVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativePDUnableToParseValueTest.jsp")), "negativePDUnableToParseValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDBodyValueTest.jsp")), "positivePDBodyValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDDateStyleTest.jsp")), "positivePDDateStyleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDFallbackLocaleTest.jsp")), "positivePDFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDLocalizationContextTest.jsp")), "positivePDLocalizationContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDParseLocaleNullEmptyTest.jsp")), "positivePDParseLocaleNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDParseLocaleTest.jsp")), "positivePDParseLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDPatternTest.jsp")), "positivePDPatternTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDScopeTest.jsp")), "positivePDScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDTimeStyleTest.jsp")), "positivePDTimeStyleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDTimeZoneNullEmptyTest.jsp")), "positivePDTimeZoneNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDTimeZonePrecedenceTest.jsp")), "positivePDTimeZonePrecedenceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDTimeZoneTest.jsp")), "positivePDTimeZoneTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDTypeTest.jsp")), "positivePDTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDValueNullEmptyTest.jsp")), "positivePDValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDValueTest.jsp")), "positivePDValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePDVarTest.jsp")), "positivePDVarTest.jsp"); - setContextRoot("/jstl_fmt_psdate_web"); - setGoldenFileDir("/jstl/spec/fmt/format/parsedate"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,7 +82,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * provided as dynamic or static String values. Pass the parsed value to * formatDate to display (due to possible timezone difference). */ + @Test public void positivePDValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDValueTest"); invoke(); } @@ -90,7 +102,10 @@ public void positivePDValueTest() throws Exception { * parsed value to formatDate to display (due to possible timezone * difference). */ + @Test public void positivePDTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDTypeTest"); invoke(); } @@ -108,7 +123,10 @@ public void positivePDTypeTest() throws Exception { * dateStyle is not present, the action will assume the date to be parsed is * in the default style. */ + @Test public void positivePDDateStyleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDDateStyleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePDDateStyleTest"); TEST_PROPS.setProperty(REQUEST, "positivePDDateStyleTest.jsp"); TEST_PROPS.setProperty(STATUS_CODE, OK); @@ -127,7 +145,10 @@ public void positivePDDateStyleTest() throws Exception { * be applied when type is set to time or both. - If timeStyle is not present, * the action will assume the time to be parsed is in the default style. */ + @Test public void positivePDTimeStyleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDTimeStyleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePDTimeStyleTest"); TEST_PROPS.setProperty(REQUEST, "positivePDTimeStyleTest.jsp"); TEST_PROPS.setProperty(STATUS_CODE, OK); @@ -144,7 +165,10 @@ public void positivePDTimeStyleTest() throws Exception { * setting the locale of the page to de_DE, and pass en_US to the action * itself. No parsing exceptions should occur. */ + @Test public void positivePDParseLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDParseLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePDParseLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positivePDParseLocaleTest.jsp"); TEST_PROPS.setProperty(STATUS_CODE, OK); @@ -160,7 +184,10 @@ public void positivePDParseLocaleTest() throws Exception { * when parsing the date value provided. Pass the parsed value to formatDate * to display (due to possible timezone difference). */ + @Test public void positivePDPatternTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDPatternTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDPatternTest"); invoke(); } @@ -175,7 +202,10 @@ public void positivePDPatternTest() throws Exception { * available via the PageContext and is of type java.util.Date (validation * performed via custom action). */ + @Test public void positivePDVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDVarTest"); invoke(); } @@ -190,7 +220,10 @@ public void positivePDVarTest() throws Exception { * specified by the scope attribute. Also verify that if scope is not present, * that var is exported to the page scope by default. */ + @Test public void positivePDScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDScopeTest"); invoke(); } @@ -207,7 +240,10 @@ public void positivePDScopeTest() throws Exception { * parsed value to formatDate to display (due to possible timezone * difference). */ + @Test public void positivePDValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDValueNullEmptyTest"); invoke(); } @@ -220,7 +256,10 @@ public void positivePDValueNullEmptyTest() throws Exception { * @testStrategy: Validate the action can properly parse a date string * provided as body content to the action. */ + @Test public void positivePDBodyValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDBodyValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDBodyValueTest"); invoke(); } @@ -236,7 +275,10 @@ public void positivePDBodyValueTest() throws Exception { * configuration variable. Pass the parsed value to formatDate to display (due * to possible timezone difference). */ + @Test public void positivePDParseLocaleNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDParseLocaleNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDParseLocaleNullEmptyTest"); invoke(); } @@ -251,10 +293,13 @@ public void positivePDParseLocaleNullEmptyTest() throws Exception { * jakarta.servlet.jsp.jstl.fmt.localizationContext. Pass the parsed value to * formatDate to display (due to possible timezone difference). */ + @Test public void positivePDLocalizationContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDLocalizationContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePDLocalizationContextTest"); TEST_PROPS.setProperty(REQUEST, "positivePDLocalizationContextTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positivePDLocalizationContextTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positivePDLocalizationContextTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -268,10 +313,13 @@ public void positivePDLocalizationContextTest() throws Exception { * fallback locale will be used. Pass the parsed value to formatDate to * display (due to possible timezone difference). */ + @Test public void positivePDFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePDFallbackLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positivePDFallbackLocaleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positivePDFallbackLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positivePDFallbackLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: xx-XX"); invoke(); } @@ -286,7 +334,10 @@ public void positivePDFallbackLocaleTest() throws Exception { * with the rethrown unparsable value in the exception text and the original * exception set as the root cause of the JspException. */ + @Test public void negativePDUnableToParseValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativePDUnableToParseValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativePDUnableToParseValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -302,7 +353,10 @@ public void negativePDUnableToParseValueTest() throws Exception { * objects. Pass the parsed value to formatDate to display (due to possible * timezone difference). */ + @Test public void positivePDTimeZoneTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDTimeZoneTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDTimeZoneTest"); invoke(); } @@ -317,7 +371,10 @@ public void positivePDTimeZoneTest() throws Exception { * using the page's time zone of EST. Pass the parsed value to formatDate to * display (due to possible timezone difference). */ + @Test public void positivePDTimeZoneNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDTimeZoneNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDTimeZoneNullEmptyTest"); invoke(); } @@ -336,7 +393,10 @@ public void positivePDTimeZoneNullEmptyTest() throws Exception { * parsed value to formatDate to display (due to possible timezone * difference). */ + @Test public void positivePDTimeZonePrecedenceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePDTimeZonePrecedenceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePDTimeZonePrecedenceTest"); invoke(); } @@ -349,6 +409,7 @@ public void positivePDTimeZonePrecedenceTest() throws Exception { * @testStrategy: validate that if var is not specified, but scope is, that a * fatal translation error occurs. */ + @Test public void negativePDScopeNoVarTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativePDScopeNoVarTest"); TEST_PROPS.setProperty(REQUEST, "negativePDScopeNoVarTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java index 928ea85ece..d735f8027a 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java @@ -14,54 +14,56 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.format.parsenum; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_psnum_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_psnum_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_psnum_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_fmt_psnum_web"); - setGoldenFileDir("/jstl/spec/fmt/format/parsenum"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativePNScopeNoVarTest.jsp")), "negativePNScopeNoVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativePNUnableToParseValueTest.jsp")), "negativePNUnableToParseValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNBodyValueTest.jsp")), "positivePNBodyValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNFallbackLocaleTest.jsp")), "positivePNFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNIntegerOnlyTest.jsp")), "positivePNIntegerOnlyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNLocalizationContextTest.jsp")), "positivePNLocalizationContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNParseLocaleNullEmptyTest.jsp")), "positivePNParseLocaleNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNParseLocaleTest.jsp")), "positivePNParseLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNPatternTest.jsp")), "positivePNPatternTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNScopeTest.jsp")), "positivePNScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNTypeTest.jsp")), "positivePNTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNValueNullEmptyTest.jsp")), "positivePNValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNValueTest.jsp")), "positivePNValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positivePNVarTest.jsp")), "positivePNVarTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +74,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate the action can correctly parse dynamic and static * values provided to the value attribute. */ + @Test public void positivePNValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNValueTest"); invoke(); } @@ -87,7 +92,10 @@ public void positivePNValueTest() throws Exception { * the three supported types (number, currency, percent). Also verify that if * type is not provided, that the value is parsed as a number. */ + @Test public void positivePNTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNTypeTest"); invoke(); } @@ -100,7 +108,10 @@ public void positivePNTypeTest() throws Exception { * @testStrategy: Validate that if a pattern is specified that it will be * applied to the parsed value no matter the value of type. */ + @Test public void positivePNPatternTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNPatternTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNPatternTest"); invoke(); } @@ -116,7 +127,10 @@ public void positivePNPatternTest() throws Exception { * validate that the presence of the parseLocale attribute will override the * locale of the page. */ + @Test public void positivePNParseLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNParseLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNParseLocaleTest"); invoke(); } @@ -131,7 +145,10 @@ public void positivePNParseLocaleTest() throws Exception { * is not specified, that the entire value will be returned parsed (default * value of false). */ + @Test public void positivePNIntegerOnlyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNIntegerOnlyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNIntegerOnlyTest"); invoke(); } @@ -144,7 +161,10 @@ public void positivePNIntegerOnlyTest() throws Exception { * @testStrategy: Validate that if var is specifed the parsed result is * exported and is of type java.lang.Number. */ + @Test public void positivePNVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNVarTest"); invoke(); } @@ -159,7 +179,10 @@ public void positivePNVarTest() throws Exception { * by the value of the scope attribute. Also verify that scope is not * specified, that var is exported to the page scope. */ + @Test public void positivePNScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNScopeTest"); invoke(); } @@ -172,7 +195,10 @@ public void positivePNScopeTest() throws Exception { * @testStrategy: Validate that the value to be parsed can be provided as body * content to the action. */ + @Test public void positivePNBodyValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNBodyValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNBodyValueTest"); invoke(); } @@ -189,7 +215,10 @@ public void positivePNBodyValueTest() throws Exception { * After the action completes, use the checkScope tag to validate the variable * no longer exists. */ + @Test public void positivePNValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNValueNullEmptyTest"); invoke(); } @@ -204,7 +233,10 @@ public void positivePNValueNullEmptyTest() throws Exception { * was used, the parse action should use the locale from the locale * configuration variable. */ + @Test public void positivePNParseLocaleNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNParseLocaleNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positivePNParseLocaleNullEmptyTest"); invoke(); } @@ -218,10 +250,13 @@ public void positivePNParseLocaleNullEmptyTest() throws Exception { * the default I18N localization context configuration variable * jakarta.servlet.jsp.jstl.fmt.localizationContext. */ + @Test public void positivePNLocalizationContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNLocalizationContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePNLocalizationContextTest"); TEST_PROPS.setProperty(REQUEST, "positivePNLocalizationContextTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positivePNLocalizationContextTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positivePNLocalizationContextTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en-US"); invoke(); } @@ -234,10 +269,13 @@ public void positivePNLocalizationContextTest() throws Exception { * @testStrategy: Validate that if no matching locale can be found, that the * fallback locale will be used. */ + @Test public void positivePNFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positivePNFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positivePNFallbackLocaleTest"); TEST_PROPS.setProperty(REQUEST, "positivePNFallbackLocaleTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positivePNFallbackLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positivePNFallbackLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: xx-XX"); invoke(); } @@ -252,7 +290,10 @@ public void positivePNFallbackLocaleTest() throws Exception { * with the rethrown unparsable value in the exception text and the original * exception set as the root cause of the JspException. */ + @Test public void negativePNUnableToParseValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativePNUnableToParseValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativePNUnableToParseValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -266,6 +307,7 @@ public void negativePNUnableToParseValueTest() throws Exception { * @testStrategy: validate that if var is not specified, but scope is, that a * fatal translation error occurs. */ + @Test public void negativePNScopeNoVarTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativePNScopeNoVarTest"); TEST_PROPS.setProperty(REQUEST, "negativePNScopeNoVarTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java index b1548c97a5..761e1f675c 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java @@ -20,48 +20,45 @@ package com.sun.ts.tests.jstl.spec.fmt.format.settimezone; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_stz_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_stz_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_stz_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneAttrScopeTest.jsp")), "positiveSetTimezoneAttrScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneScopeTest.jsp")), "positiveSetTimezoneScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneSetAttrTest.jsp")), "positiveSetTimezoneSetAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneValueNullEmptyTest.jsp")), "positiveSetTimezoneValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneValueTest.jsp")), "positiveSetTimezoneValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetTimezoneVarTest.jsp")), "positiveSetTimezoneVarTest.jsp"); - setContextRoot("/jstl_fmt_stz_web"); - setGoldenFileDir("/jstl/spec/fmt/format/settimezone"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -75,7 +72,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * as well as three letter timezones (ex. PST) or fully qualified values (ex. * America/Los_Angeles). */ + @Test public void positiveSetTimezoneValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -89,7 +89,10 @@ public void positiveSetTimezoneValueTest() throws Exception { * @testStrategy: Validate that a scoped variable of type java.util.TimeZone * is properly set and associated with the variable name specified by var. */ + @Test public void positiveSetTimezoneVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneVarTest"); invoke(); } @@ -105,7 +108,10 @@ public void positiveSetTimezoneVarTest() throws Exception { * that if var is specified and scope is not, that var is exported to the page * scope by default. */ + @Test public void positiveSetTimezoneScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneScopeTest"); invoke(); } @@ -118,7 +124,10 @@ public void positiveSetTimezoneScopeTest() throws Exception { * @testStrategy: Validate that if the value attribute is null or empty, the * GMT+0 timezone is used by the formatting actions that rely on timezone. */ + @Test public void positiveSetTimezoneValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneValueNullEmptyTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -132,7 +141,10 @@ public void positiveSetTimezoneValueNullEmptyTest() throws Exception { * @testStrategy: Validate that if var is not set, the scoped variable * jakarta.servlet.jsp.jstl.fmt.timeZone is properly set. */ + @Test public void positiveSetTimezoneSetAttrTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneSetAttrTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneSetAttrTest"); invoke(); } @@ -147,7 +159,10 @@ public void positiveSetTimezoneSetAttrTest() throws Exception { * the scoped variable, jakarta.servlet.jsp.jstl.fmt.timeZone is exported to the * appropriate scope. */ + @Test public void positiveSetTimezoneAttrScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetTimezoneAttrScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetTimezoneAttrScopeTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java similarity index 54% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java index b30438f636..89955c3b00 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java @@ -14,54 +14,44 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.format.timezone; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_tz_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_tz_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_tz_web.xml")); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTimezoneValueNullEmptyTest.jsp")), "positiveTimezoneValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTimezoneValueTest.jsp")), "positiveTimezoneValueTest.jsp"); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_fmt_tz_web"); - setGoldenFileDir("/jstl/spec/fmt/format/timezone"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -74,7 +64,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * values as well as three letter timezones (ex. PST) or fully qualified * values (ex. America/Los_Angeles). */ + @Test public void positiveTimezoneValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTimezoneValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTimezoneValueTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -88,7 +81,10 @@ public void positiveTimezoneValueTest() throws Exception { * @testStrategy: Validate that if the value attribute is null or emtpy, the * GMT+0 timezone is used by the formatting actions that rely on timezone. */ + @Test public void positiveTimezoneValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTimezoneValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTimezoneValueNullEmptyTest"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java index 595eb141f6..1bfda0cd3d 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java @@ -14,54 +14,49 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.bundle; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_bundle_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_bundle_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_bundle_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleBasenameNullEmptyTest.jsp")), "positiveBundleBasenameNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleBasenameTest.jsp")), "positiveBundleBasenameTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleFallbackLocaleTest.jsp")), "positiveBundleFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleLocaleConfigurationTest.jsp")), "positiveBundleLocaleConfigurationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundleLocalizationScopeTest.jsp")), "positiveBundleLocalizationScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBundlePrefixTest.jsp")), "positiveBundlePrefixTest.jsp"); - setContextRoot("/jstl_fmt_bundle_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/bundle"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,10 +67,13 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that ResourceBundles can be properly located by the * specifed basename attribute and that the appropriate messages are printed. */ + @Test public void positiveBundleBasenameTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleBasenameTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleBasenameTest"); TEST_PROPS.setProperty(REQUEST, "positiveBundleBasenameTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveBundleBasenameTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveBundleBasenameTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -88,10 +86,13 @@ public void positiveBundleBasenameTest() throws Exception { * @testStragegy: Validate that messages can be properly looked up and * displayed when a prefix is specified. */ + @Test public void positiveBundlePrefixTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundlePrefixTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundlePrefixTest"); TEST_PROPS.setProperty(REQUEST, "positiveBundlePrefixTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveBundlePrefixTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveBundlePrefixTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -105,11 +106,14 @@ public void positiveBundlePrefixTest() throws Exception { * that are displayed are in the form of "??????" where is the name * of the key that failed the lookup */ + @Test public void positiveBundleBasenameNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleBasenameNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleBasenameNullEmptyTest"); TEST_PROPS.setProperty(REQUEST, "positiveBundleBasenameNullEmptyTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveBundleBasenameNullEmptyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveBundleBasenameNullEmptyTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -123,11 +127,14 @@ public void positiveBundleBasenameNullEmptyTest() throws Exception { * bundle action, that any messages within the body of the bundle action are * properly localized and any message actions outside the body are not. */ + @Test public void positiveBundleLocalizationScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleLocalizationScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleLocalizationScopeTest"); TEST_PROPS.setProperty(REQUEST, "positiveBundleLocalizationScopeTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveBundleLocalizationScopeTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveBundleLocalizationScopeTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -145,12 +152,15 @@ public void positiveBundleLocalizationScopeTest() throws Exception { * across the wire that, if used, will not resolve to any ResourceBundle (no * fallback defined). */ + @Test public void positiveBundleLocaleConfigurationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleLocaleConfigurationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleLocaleConfigurationTest"); TEST_PROPS.setProperty(REQUEST, "positiveBundleLocaleConfigurationTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveBundleLocaleConfigurationTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveBundleLocaleConfigurationTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: ja"); invoke(); } @@ -169,9 +179,12 @@ public void positiveBundleLocaleConfigurationTest() throws Exception { * configured using a String representation of a locale as well as an Instance * of Locale. */ + @Test public void positiveBundleFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBundleFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveBundleFallbackLocaleTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveBundleFallbackLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveBundleFallbackLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveBundleFallbackLocaleTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: ja"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java similarity index 61% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java index 59d45a72fa..24b0e77399 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java @@ -14,54 +14,60 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.message; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + /** Creates new JSTLClient */ + public JSTLClientIT() { setContextRoot("/jstl_fmt_message_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/message"); + } - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_message_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_message_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/localeSupportTest.jsp")), "localeSupportTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeLocaleSupportTest.jsp")), "negativeLocaleSupportTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageBundleOverrideTest.jsp")), "positiveMessageBundleOverrideTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageBundleTest.jsp")), "positiveMessageBundleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageCompoundNoParamTest.jsp")), "positiveMessageCompoundNoParamTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageFallbackLocaleTest.jsp")), "positiveMessageFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyBodyTest.jsp")), "positiveMessageKeyBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyNotFoundTest.jsp")), "positiveMessageKeyNotFoundTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyNullEmptyTest.jsp")), "positiveMessageKeyNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyParamBodyTest.jsp")), "positiveMessageKeyParamBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageKeyTest.jsp")), "positiveMessageKeyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageLocaleConfigurationTest.jsp")), "positiveMessageLocaleConfigurationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageNoLocalizationContextTest.jsp")), "positiveMessageNoLocalizationContextTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageParamBodyTest.jsp")), "positiveMessageParamBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessagePrefixTest.jsp")), "positiveMessagePrefixTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageScopeTest.jsp")), "positiveMessageScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMessageVarTest.jsp")), "positiveMessageVarTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -73,9 +79,12 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * and display the message associated with the provided key. This will also * establish that the key attribute can accept both static and dynamic values. */ + @Test public void positiveMessageKeyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -89,9 +98,12 @@ public void positiveMessageKeyTest() throws Exception { * @testStrategy: Validate that the message action can lookup a localized * message from a ResourceBundle specified via the bundle attribute. */ + @Test public void positiveMessageBundleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageBundleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageBundleTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageBundleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageBundleTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageBundleTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -106,9 +118,12 @@ public void positiveMessageBundleTest() throws Exception { * to the current JspWriter, but is exported to the PageContext and associated * with the name specified by var. */ + @Test public void positiveMessageVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageVarTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageVarTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageVarTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageVarTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -124,9 +139,12 @@ public void positiveMessageVarTest() throws Exception { * var is exported. This will also validate that if var is specified, but * scope is not, var is exported to the page scope by default. */ + @Test public void positiveMessageScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageScopeTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageScopeTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageScopeTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageScopeTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -140,9 +158,12 @@ public void positiveMessageScopeTest() throws Exception { * @testStrategy: Validate that if the key attribute evaluates to null, or is * empty (""), that '??????' is written to the current JspWriter. */ + @Test public void positiveMessageKeyNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyNullEmptyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyNullEmptyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyNullEmptyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyNullEmptyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -157,9 +178,12 @@ public void positiveMessageKeyNullEmptyTest() throws Exception { * does not exist in the ResourceBundle being used, the '??????' is * written to the current JspWriter ( is the unknown key). */ + @Test public void positiveMessageKeyNotFoundTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyNotFoundTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyNotFoundTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyNotFoundTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyNotFoundTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyNotFoundTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -173,9 +197,12 @@ public void positiveMessageKeyNotFoundTest() throws Exception { * @testStrategy: Validate that the message action can properly look up a * localized message when the key is provided as body content to the action. */ + @Test public void positiveMessageKeyBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyBodyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyBodyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyBodyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyBodyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -190,9 +217,12 @@ public void positiveMessageKeyBodyTest() throws Exception { * display compound messages with the key and subtags provided as * body content to the action. */ + @Test public void positiveMessageKeyParamBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageKeyParamBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageKeyParamBodyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyParamBodyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageKeyParamBodyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageKeyParamBodyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -207,9 +237,12 @@ public void positiveMessageKeyParamBodyTest() throws Exception { * replacement of parameters provided as body content against a compound * message. */ + @Test public void positiveMessageParamBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageParamBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageParamBodyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageParamBodyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageParamBodyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageParamBodyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -223,9 +256,12 @@ public void positiveMessageParamBodyTest() throws Exception { * @testStrategy: Validate that if a message is compound and no param subtags * are provided, the message is returned as is. */ + @Test public void positiveMessageCompoundNoParamTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageCompoundNoParamTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageCompoundNoParamTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageCompoundNoParamTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageCompoundNoParamTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageCompoundNoParamTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -239,9 +275,12 @@ public void positiveMessageCompoundNoParamTest() throws Exception { * @testStrategy: Validate that a message action will use the prefix specified * by a parent bundle action when looking up messsage keys. */ + @Test public void positiveMessagePrefixTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessagePrefixTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessagePrefixTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessagePrefixTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessagePrefixTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessagePrefixTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -257,9 +296,12 @@ public void positiveMessagePrefixTest() throws Exception { * the key look up will be performed against the resource bundle specified by * the bundle attribute. */ + @Test public void positiveMessageBundleOverrideTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageBundleOverrideTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageBundleOverrideTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageBundleOverrideTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageBundleOverrideTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageBundleOverrideTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -274,7 +316,10 @@ public void positiveMessageBundleOverrideTest() throws Exception { * message action has a null resource bundle, the message displayed is * ??????. */ + @Test public void positiveMessageNoLocalizationContextTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageNoLocalizationContextTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveMessageNoLocalizationContextTest"); invoke(); @@ -293,10 +338,13 @@ public void positiveMessageNoLocalizationContextTest() throws Exception { * send a preferred locale across the wire that, if used, will not resolve to * any ResourceBundle (no fallback defined). */ + @Test public void positiveMessageLocaleConfigurationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageLocaleConfigurationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageLocaleConfigurationTest"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveMessageLocaleConfigurationTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveMessageLocaleConfigurationTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageLocaleConfigurationTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: ja"); @@ -316,9 +364,12 @@ public void positiveMessageLocaleConfigurationTest() throws Exception { * Additionally verify that the fallbackLocale variable can be configured * using a String representation of a locale as well as an instance of Locale. */ + @Test public void positiveMessageFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveMessageFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveMessageFallbackLocaleTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageFallbackLocaleTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveMessageFallbackLocaleTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveMessageFallbackLocaleTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: ja"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java similarity index 52% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java index 7c7062f465..eb87f8dfcc 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java @@ -14,54 +14,44 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.param; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_param_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_param_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_param_web.xml")); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamValueBodyTest.jsp")), "positiveParamValueBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamValueTest.jsp")), "positiveParamValueTest.jsp"); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_fmt_param_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/param"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,9 +62,12 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that parametric replacement occurs when param * subtags are specified with either dynamic or static values. */ + @Test public void positiveParamValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveParamValueTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveParamValueTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); @@ -88,9 +81,12 @@ public void positiveParamValueTest() throws Exception { * @testStrategy: Validate that the value of the parameter can be provided as * body content to the action. */ + @Test public void positiveParamValueBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamValueBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveParamValueBodyTest"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueBodyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveParamValueBodyTest.gf"); TEST_PROPS.setProperty(REQUEST, "positiveParamValueBodyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java index f0d57445a8..3341e6ca81 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java @@ -14,54 +14,47 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.requestencoding; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_reqenc_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_reqenc_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_reqenc_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveContentTypeEncodingTest.jsp")), "positiveContentTypeEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDefaultEncodingTest.jsp")), "positiveDefaultEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveReqEncodingValueTest.jsp")), "positiveReqEncodingValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScopedAttrEncodingTest.jsp")), "positiveScopedAttrEncodingTest.jsp"); - setContextRoot("/jstl_fmt_reqenc_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/requestencoding"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +65,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that setting the value of the requestEncoding * action correctly sets the encoding of the page. */ + @Test public void positiveReqEncodingValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveReqEncodingValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveReqEncodingValueTest"); invoke(); } @@ -88,12 +84,15 @@ public void positiveReqEncodingValueTest() throws Exception { * getCharacterEncoding() against the request object after the action has been * called. */ + @Test public void positiveContentTypeEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveContentTypeEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveContentTypeEncodingTest"); TEST_PROPS.setProperty(REQUEST, "positiveContentTypeEncodingTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Content-Type: text/plain; charset=UTF-8"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveContentTypeEncodingTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveContentTypeEncodingTest.gf"); invoke(); } @@ -109,7 +108,10 @@ public void positiveContentTypeEncodingTest() throws Exception { * getCharacterEncoding() against the request object after the action has been * called. */ + @Test public void positiveScopedAttrEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveScopedAttrEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveScopedAttrEncodingTest"); invoke(); } @@ -126,7 +128,10 @@ public void positiveScopedAttrEncodingTest() throws Exception { * getCharacterEncoding() against the request object after the action has been * called. */ + @Test public void positiveDefaultEncodingTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDefaultEncodingTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDefaultEncodingTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java similarity index 80% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java index 8407a9eb83..cd3be7000a 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java @@ -14,54 +14,43 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ -package com.sun.ts.tests.jstl.spec.fmt.i18n.resourcelookup; -import java.io.PrintWriter; +package com.sun.ts.tests.jstl.spec.fmt.i18n.resourcelookup; -import com.sun.javatest.Status; +import java.io.IOException; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_reslook_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_reslook_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_reslook_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/formatBundleResourceLookup.jsp")), "formatBundleResourceLookup.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/formatSetBundleResourceLookup.jsp")), "formatSetBundleResourceLookup.jsp"); - setContextRoot("/jstl_fmt_reslook_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/resourcelookup"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -74,6 +63,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * specified when using the fmt:bundle action. This test is based on the 4 * examples listed in section 8.3.3 of the JSTL specification. */ + @Test public void positiveResourceBundleLookupTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveResourceBundleLookupTest"); TEST_PROPS.setProperty(REQUEST, @@ -118,6 +108,7 @@ public void positiveResourceBundleLookupTest() throws Exception { * specified when using the fmt:bundle action. This test is based on the 4 * examples listed in section 8.3.3 of the JSTL specification. */ + @Test public void positiveResourceSetBundleLookupTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveSetResourceBundleLookupTest"); TEST_PROPS.setProperty(REQUEST, diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java similarity index 76% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java index 54bb4ea8d3..b7d074fec7 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java @@ -14,54 +14,42 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ -package com.sun.ts.tests.jstl.spec.fmt.i18n.responseencoding; -import java.io.PrintWriter; +package com.sun.ts.tests.jstl.spec.fmt.i18n.responseencoding; -import com.sun.javatest.Status; +import java.io.IOException; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_resenc_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_resenc_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_resenc_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { - - setContextRoot("/jstl_fmt_resenc_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/responseencoding"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResponseEncodingTest.jsp")), "positiveResponseEncodingTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResponseSetCharEncodingAttrTest.jsp")), "positiveResponseSetCharEncodingAttrTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -73,6 +61,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * context properly call ServletResponse.setLocale(). Actions that do this * are: */ + @Test public void positiveResponseEncodingTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveResponseEncodingTest"); TEST_PROPS.setProperty(REQUEST, @@ -108,6 +97,7 @@ public void positiveResponseEncodingTest() throws Exception { * jakarta.servlet.jsp.jstl.fmt.request.charset session attribute. Actions that * do this are: */ + @Test public void positiveResponseSetCharEncodingAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "positiveResponseSetCharEncodingAttrTest"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java similarity index 62% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java index 1c3fe440c6..6a530d12ba 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java @@ -14,54 +14,50 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.setbundle; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_setbundle_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_setbundle_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_setbundle_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleBasenameNullEmptyTest.jsp")), "positiveSetBundleBasenameNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleBasenameTest.jsp")), "positiveSetBundleBasenameTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleFallbackLocaleTest.jsp")), "positiveSetBundleFallbackLocaleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleLocaleConfigurationTest.jsp")), "positiveSetBundleLocaleConfigurationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleScopeLocCtxTest.jsp")), "positiveSetBundleScopeLocCtxTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleScopeVarTest.jsp")), "positiveSetBundleScopeVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBundleVarTest.jsp")), "positiveSetBundleVarTest.jsp"); - setContextRoot("/jstl_fmt_setbundle_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/setbundle"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -75,10 +71,13 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * jakarta.servlet.jsp.jstl.fmt.localizationContext will be set with the * LocalizationContext returned from the lookup algorithm. */ + @Test public void positiveSetBundleBasenameTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleBasenameTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleBasenameTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleBasenameTest.jsp"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleBasenameTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleBasenameTest.gf"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); invoke(); } @@ -92,11 +91,14 @@ public void positiveSetBundleBasenameTest() throws Exception { * resource lookup is stored in the PageContext accessible by referencing var * and is of type jakarta.servlet.jsp.jstl.fmt.LocalizationContext. */ + @Test public void positiveSetBundleVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleVarTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleVarTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleVarTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleVarTest.gf"); invoke(); } @@ -111,11 +113,14 @@ public void positiveSetBundleVarTest() throws Exception { * scope attribute. If scope is not present and var is, var will be exported * to the page scope by default. */ + @Test public void positiveSetBundleScopeVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleScopeVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleScopeVarTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleScopeVarTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeVarTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeVarTest.gf"); invoke(); } @@ -131,11 +136,14 @@ public void positiveSetBundleScopeVarTest() throws Exception { * specified. If scope is not specified, then the configuration variable will * be exported to the page scope by default. */ + @Test public void positiveSetBundleScopeLocCtxTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleScopeLocCtxTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleScopeLocCtxTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleScopeLocCtxTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeLocCtxTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleScopeLocCtxTest.gf"); invoke(); } @@ -148,13 +156,16 @@ public void positiveSetBundleScopeLocCtxTest() throws Exception { * exception occurs and the result of the action is a null * LocalizationContext. */ + @Test public void positiveSetBundleBasenameNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleBasenameNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleBasenameNullEmptyTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleBasenameNullEmptyTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: en"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveSetBundleBasenameNullEmptyTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveSetBundleBasenameNullEmptyTest.gf"); invoke(); } @@ -171,14 +182,17 @@ public void positiveSetBundleBasenameNullEmptyTest() throws Exception { * preferred locale across the wire that, if used, will not resolve to any * ResourceBundle (no fallback defined). */ + @Test public void positiveSetBundleLocaleConfigurationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleLocaleConfigurationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleLocaleConfigurationTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetBundleLocaleConfigurationTest.jsp"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: ja"); - TEST_PROPS.setProperty(GOLDENFILE, - "positiveSetBundleLocaleConfigurationTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, + // "positiveSetBundleLocaleConfigurationTest.gf"); invoke(); } @@ -196,7 +210,10 @@ public void positiveSetBundleLocaleConfigurationTest() throws Exception { * be configured using a String representation of a locale as well as an * instance of Locale. */ + @Test public void positiveSetBundleFallbackLocaleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBundleFallbackLocaleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetBundleFallbackLocaleTest"); TEST_PROPS.setProperty(GOLDENFILE, "positiveSetBundleFallbackLocaleTest.gf"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java index f3e99ed586..de09e377d3 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java @@ -14,54 +14,49 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.fmt.i18n.setlocale; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_fmt_setlocale_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_fmt_setlocale_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_fmt_setlocale_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleOverrideTest.jsp")), "positiveSetLocaleOverrideTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleScopeTest.jsp")), "positiveSetLocaleScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleValueNullEmptyTest.jsp")), "positiveSetLocaleValueNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleValueTest.jsp")), "positiveSetLocaleValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleVariantIgnoreTest.jsp")), "positiveSetLocaleVariantIgnoreTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLocaleVariantTest.jsp")), "positiveSetLocaleVariantTest.jsp"); - setContextRoot("/jstl_fmt_setlocale_web"); - setGoldenFileDir("/jstl/spec/fmt/i18n/setlocale"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -72,7 +67,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate value can accept both String representations of * locales as well as instances of java.util.Locale. */ + @Test public void positiveSetLocaleValueTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleValueTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetLocaleValueTest"); invoke(); } @@ -86,7 +84,10 @@ public void positiveSetLocaleValueTest() throws Exception { * values as well as validate that the jakarta.servlet.jsp.jstl.fmt.locale * scoped variable is set with the proper value. */ + @Test public void positiveSetLocaleVariantTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleVariantTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetLocaleVariantTest"); invoke(); } @@ -99,7 +100,10 @@ public void positiveSetLocaleVariantTest() throws Exception { * @testStrategy: Validate that if value is provided with a null or empty * value that the runtime default locale is used. */ + @Test public void positiveSetLocaleValueNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleValueNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetLocaleValueNullEmptyTest"); invoke(); } @@ -115,7 +119,10 @@ public void positiveSetLocaleValueNullEmptyTest() throws Exception { * configuration variable is in the expected scope. If scope is not specifed, * verify that it is in the page scope. */ + @Test public void positiveSetLocaleScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetLocaleScopeTest"); invoke(); } @@ -131,12 +138,15 @@ public void positiveSetLocaleScopeTest() throws Exception { * page will be set to en_US. The en resources bundle should be used and not * the sw bundle. */ + @Test public void positiveSetLocaleOverrideTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleOverrideTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveSetLocaleOverrideTest"); TEST_PROPS.setProperty(REQUEST, "positiveSetLocaleOverrideTest.jsp?res=AlgoResources5&fall=de"); TEST_PROPS.setProperty(REQUEST_HEADERS, "Accept-Language: sw"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveSetLocaleOverrideTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveSetLocaleOverrideTest.gf"); invoke(); } @@ -150,7 +160,10 @@ public void positiveSetLocaleOverrideTest() throws Exception { * that the variant is ignored and the expected locale of en_US is returned by * the test. */ + @Test public void positiveSetLocaleVariantIgnoreTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLocaleVariantIgnoreTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetLocaleVariantIgnoreTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java similarity index 56% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java index b72fb7a6e2..3cf0f9deb9 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java @@ -20,52 +20,68 @@ package com.sun.ts.tests.jstl.spec.sql.param; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ - - /** Creates new JSTLClient */ - public JSTLClient() { - } - - /* - * public methods - * ======================================================================== - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/param"); setContextRoot("/jstl_sql_param_web"); - setGoldenFileDir("/jstl/spec/sql/param"); + } - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_param_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_param_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDateParamTypeAttributeTest.jsp")), "negativeDateParamTypeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParamQueryBodyContentTest.jsp")), "negativeParamQueryBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParamQuerySQLAttributeTest.jsp")), "negativeParamQuerySQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParamUpdateBodyContentTest.jsp")), "negativeParamUpdateBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamQueryDateTest.jsp")), "positiveDateParamQueryDateTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamQueryNoTypeTest.jsp")), "positiveDateParamQueryNoTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamQueryTimestampTest.jsp")), "positiveDateParamQueryTimestampTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamQueryTimeTest.jsp")), "positiveDateParamQueryTimeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamUpdateDateTest.jsp")), "positiveDateParamUpdateDateTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamUpdateNoTypeTest.jsp")), "positiveDateParamUpdateNoTypeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamUpdateTimestampTest.jsp")), "positiveDateParamUpdateTimestampTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDateParamUpdateTimeTest.jsp")), "positiveDateParamUpdateTimeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamBodyContentQueryTest.jsp")), "positiveParamBodyContentQueryTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamBodyContentUpdateTest.jsp")), "positiveParamBodyContentUpdateTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamQueryBodyContentTest.jsp")), "positiveParamQueryBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamQueryMultiBodyContentTest.jsp")), "positiveParamQueryMultiBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamQueryMultiSQLAttributeTest.jsp")), "positiveParamQueryMultiSQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamQuerySQLAttributeTest.jsp")), "positiveParamQuerySQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamUpdateBodyContentTest.jsp")), "positiveParamUpdateBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamUpdateMultiBodyContentTest.jsp")), "positiveParamUpdateMultiBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamUpdateMultiSQLAttributeTest.jsp")), "positiveParamUpdateMultiSQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParamUpdateSQLAttributeTest.jsp")), "positiveParamUpdateSQLAttributeTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } + /* * @testName: positiveParamQuerySQLAttributeTest * @@ -75,7 +91,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * can be executed using sql attribute and sql:param action - Validate that * you get the expected number of rows back. */ + @Test public void positiveParamQuerySQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamQuerySQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamQuerySQLAttributeTest"); invoke(); } @@ -89,7 +108,10 @@ public void positiveParamQuerySQLAttributeTest() throws Exception { * can be executed using sql:param action and passing the query as body * content. - Validate that you get the expected number of rows back. */ + @Test public void positiveParamQueryBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamQueryBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamQueryBodyContentTest"); invoke(); } @@ -105,7 +127,10 @@ public void positiveParamQueryBodyContentTest() throws Exception { * the sql:params action is the order the placeholders in the query are filled * in. */ + @Test public void positiveParamQueryMultiSQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamQueryMultiSQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamQueryMultiSQLAttributeTest"); invoke(); } @@ -121,7 +146,10 @@ public void positiveParamQueryMultiSQLAttributeTest() throws Exception { * That the order of the sql:params action is the order the placeholders in * the query are filled in. */ + @Test public void positiveParamQueryMultiBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamQueryMultiBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamQueryMultiBodyContentTest"); invoke(); } @@ -135,7 +163,10 @@ public void positiveParamQueryMultiBodyContentTest() throws Exception { * query can be executed using sql attribute and multiple sql:param actions - * Validate that you get the expected number of rows back. */ + @Test public void positiveParamUpdateMultiSQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamUpdateMultiSQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamUpdateMultiSQLAttributeTest"); invoke(); @@ -150,7 +181,10 @@ public void positiveParamUpdateMultiSQLAttributeTest() throws Exception { * query can be executed using mutiple sql:param actions and passing the query * as body content. - Validate that you get the expected number of rows back. */ + @Test public void positiveParamUpdateMultiBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamUpdateMultiBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamUpdateMultiBodyContentTest"); invoke(); } @@ -164,7 +198,10 @@ public void positiveParamUpdateMultiBodyContentTest() throws Exception { * can be executed using sql:dateParam action specifying a type of 'date' - * Validate that you get the expected number of rows back. */ + @Test public void positiveDateParamQueryDateTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamQueryDateTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamQueryDateTest"); invoke(); } @@ -178,7 +215,10 @@ public void positiveDateParamQueryDateTest() throws Exception { * can be executed using sql:dateParam action specifying a type of 'time' - * Validate that you get the expected number of rows back. */ + @Test public void positiveDateParamQueryTimeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamQueryTimeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamQueryTimeTest"); invoke(); } @@ -192,7 +232,10 @@ public void positiveDateParamQueryTimeTest() throws Exception { * can be executed using sql:dateParam action specifying a type of 'timestamp' * - Validate that you get the expected number of rows back. */ + @Test public void positiveDateParamQueryTimestampTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamQueryTimestampTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamQueryTimestampTest"); invoke(); } @@ -207,7 +250,10 @@ public void positiveDateParamQueryTimestampTest() throws Exception { * defaults to 'timestamp' - Validate that you get the expected number of rows * back. */ + @Test public void positiveDateParamQueryNoTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamQueryNoTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamQueryNoTypeTest"); invoke(); } @@ -221,7 +267,10 @@ public void positiveDateParamQueryNoTypeTest() throws Exception { * query can be executed using sql:dateParam action specifying a type of * 'date'. */ + @Test public void positiveDateParamUpdateDateTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamUpdateDateTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamUpdateDateTest"); invoke(); } @@ -235,7 +284,10 @@ public void positiveDateParamUpdateDateTest() throws Exception { * query can be executed using sql:dateParam action specifying a type of * 'time'. */ + @Test public void positiveDateParamUpdateTimeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamUpdateTimeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamUpdateTimeTest"); invoke(); } @@ -249,7 +301,10 @@ public void positiveDateParamUpdateTimeTest() throws Exception { * query can be executed using sql:dateParam action specifying a type of * 'timestamp'. */ + @Test public void positiveDateParamUpdateTimestampTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamUpdateTimestampTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamUpdateTimestampTest"); invoke(); } @@ -264,7 +319,10 @@ public void positiveDateParamUpdateTimestampTest() throws Exception { * defaults to 'timestamp' - Validate that you get the expected number of rows * back. */ + @Test public void positiveDateParamUpdateNoTypeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDateParamUpdateNoTypeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveDateParamUpdateNoTypeTest"); invoke(); } @@ -277,7 +335,10 @@ public void positiveDateParamUpdateNoTypeTest() throws Exception { * @testStrategy: Validate the behavior of the sql:update action - That a * query can be executed by specifying a paramater via sql:param action */ + @Test public void positiveParamUpdateBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamUpdateBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamUpdateBodyContentTest"); invoke(); } @@ -291,7 +352,10 @@ public void positiveParamUpdateBodyContentTest() throws Exception { * attribute - That a query can be executed by specifying a paramater via * sql:param action */ + @Test public void positiveParamUpdateSQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamUpdateSQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamUpdateSQLAttributeTest"); invoke(); } @@ -305,7 +369,10 @@ public void positiveParamUpdateSQLAttributeTest() throws Exception { * can be executed by specifying a paramater via sql:param action which passes * the parameter value as a String. */ + @Test public void positiveParamBodyContentQueryTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamBodyContentQueryTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamBodyContentQueryTest"); invoke(); } @@ -319,7 +386,10 @@ public void positiveParamBodyContentQueryTest() throws Exception { * query can be executed by specifying a paramater via sql:param action which * passes the parameter value as a String. */ + @Test public void positiveParamBodyContentUpdateTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParamBodyContentUpdateTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParamBodyContentUpdateTest"); invoke(); } @@ -334,7 +404,10 @@ public void positiveParamBodyContentUpdateTest() throws Exception { * action - Validate that a JspException is thrown when the sql:param action * is omitted */ + @Test public void negativeParamQuerySQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeParamQuerySQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeParamQuerySQLAttributeTest"); invoke(); } @@ -349,7 +422,10 @@ public void negativeParamQuerySQLAttributeTest() throws Exception { * requires a sql:param action - Validate that a JspException is thrown when * the sql:param action is omitted */ + @Test public void negativeParamQueryBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeParamQueryBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeParamQueryBodyContentTest"); invoke(); } @@ -363,7 +439,10 @@ public void negativeParamQueryBodyContentTest() throws Exception { * that a JspException is thrown when an invalid value is provided for the * type attribute. */ + @Test public void negativeDateParamTypeAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeDateParamTypeAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeDateParamTypeAttributeTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java index c65a800a24..53b5521007 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java @@ -20,52 +20,77 @@ package com.sun.ts.tests.jstl.spec.sql.query; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } - - /* - * public methods - * ======================================================================== - */ + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/query"); setContextRoot("/jstl_sql_query_web"); setGoldenFileDir("/jstl/spec/sql/query"); + } + - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_query_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_query_web.xml")); + archive.addClasses(ResultSetQueryTag.class); + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "WEB-INF/resultSetQuery.tld", "resultSetQuery.tld"); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryBodyContentTest.jsp")), "negativeQueryBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryDataSourceAttributeEmptyTest.jsp")), "negativeQueryDataSourceAttributeEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryDataSourceAttributeTest.jsp")), "negativeQueryDataSourceAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryDataSourceNullAttributeTest.jsp")), "negativeQueryDataSourceNullAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryMaxRowsAttributeTest2.jsp")), "negativeQueryMaxRowsAttributeTest2.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryMaxRowsConfigTest.jsp")), "negativeQueryMaxRowsConfigTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryMaxRowsConfigTest2.jsp")), "negativeQueryMaxRowsConfigTest2.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryNoVarAttributeTest.jsp")), "negativeQueryNoVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryScopeAttributeTest.jsp")), "negativeQueryScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQuerySQLAttributeTest.jsp")), "negativeQuerySQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeQueryVarAttributeTest.jsp")), "negativeQueryVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryBodyContentTest.jsp")), "positiveQueryBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryDataSourceAttributeDataSourceTest.jsp")), "positiveQueryDataSourceAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryDataSourceAttributeDriverManagerTest.jsp")), "positiveQueryDataSourceAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryDataSourceConfigDataSourceTest.jsp")), "positiveQueryDataSourceConfigDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryDataSourceConfigDriverManagerTest.jsp")), "positiveQueryDataSourceConfigDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryDataSourceConfigPrecedenceTest.jsp")), "positiveQueryDataSourceConfigPrecedenceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryEmptyResultTest.jsp")), "positiveQueryEmptyResultTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryMaxRowsAttributeTest.jsp")), "positiveQueryMaxRowsAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryMaxRowsConfigTest.jsp")), "positiveQueryMaxRowsConfigTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryMaxRowsIntegerConfigTest.jsp")), "positiveQueryMaxRowsIntegerConfigTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryScopeAttributeTest.jsp")), "positiveQueryScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQuerySQLAttributeTest.jsp")), "positiveQuerySQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryStartRowAttributeTest.jsp")), "positiveQueryStartRowAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveQueryVarAttributeTest.jsp")), "positiveQueryVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultSupportTest.jsp")), "positiveResultSupportTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } + /* * @testName: positiveQueryBodyContentTest * @@ -77,7 +102,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * within the body of the sql:query acton and validate that you get the * expected number of rows back. */ + @Test public void positiveQueryBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryBodyContentTest"); invoke(); } @@ -91,7 +119,10 @@ public void positiveQueryBodyContentTest() throws Exception { * That a query can be successfully executed when the dataSource attribute is * passed an instance of a DataSource. */ + @Test public void positiveQueryDataSourceAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryDataSourceAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryDataSourceAttributeDataSourceTest"); invoke(); @@ -106,7 +137,10 @@ public void positiveQueryDataSourceAttributeDataSourceTest() throws Exception { * setting it to a String representing JDBC DriverManager parameters. The * query is passed as body content */ + @Test public void positiveQueryDataSourceAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryDataSourceAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryDataSourceAttributeDriverManagerTest"); invoke(); @@ -122,7 +156,10 @@ public void positiveQueryDataSourceAttributeDriverManagerTest() throws Exception * for defining the query and validate that you get the expected number of * rows back. */ + @Test public void positiveQuerySQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQuerySQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQuerySQLAttributeTest"); invoke(); } @@ -137,7 +174,10 @@ public void positiveQuerySQLAttributeTest() throws Exception { * as well as validating that if scope is not specified, var will be exported * to the page scope by default. */ + @Test public void positiveQueryScopeAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryScopeAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryScopeAttributeTest"); invoke(); } @@ -150,7 +190,10 @@ public void positiveQueryScopeAttributeTest() throws Exception { * @testStrategy: Validate that the var attribute within a action * is of type jakarta.servlet.jsp.jstl.sql.Result. */ + @Test public void positiveQueryVarAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryVarAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryVarAttributeTest"); invoke(); } @@ -163,7 +206,10 @@ public void positiveQueryVarAttributeTest() throws Exception { * @testStrategy: Validate that if a sql query returns no rows, that an empty * Result object is returned */ + @Test public void positiveQueryEmptyResultTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryEmptyResultTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryEmptyResultTest"); invoke(); } @@ -178,7 +224,10 @@ public void positiveQueryEmptyResultTest() throws Exception { * maxRows is '-1'. - That 'maxRows'rows returned if maxRows specified. - That * 'maxRows' can be specified as an expression or specified directly. */ + @Test public void positiveQueryMaxRowsAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryMaxRowsAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryMaxRowsAttributeTest"); invoke(); } @@ -196,7 +245,10 @@ public void positiveQueryMaxRowsAttributeTest() throws Exception { * used with maxRows - That 'startRow' can be specified as an expression or * specified directly. */ + @Test public void positiveQueryStartRowAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryStartRowAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryStartRowAttributeTest"); invoke(); } @@ -212,7 +264,10 @@ public void positiveQueryStartRowAttributeTest() throws Exception { * are returned if the config param is '-1'. - That maxRows attribute takes * precedence over the config param. */ + @Test public void positiveQueryMaxRowsConfigTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryMaxRowsConfigTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryMaxRowsConfigTest"); invoke(); } @@ -228,7 +283,10 @@ public void positiveQueryMaxRowsConfigTest() throws Exception { * rows are returned if the config param is '-1'. - That maxRows attribute * takes precedence over the config param. */ + @Test public void positiveQueryMaxRowsIntegerConfigTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryMaxRowsIntegerConfigTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryMaxRowsIntegerConfigTest"); invoke(); } @@ -242,7 +300,10 @@ public void positiveQueryMaxRowsIntegerConfigTest() throws Exception { * precedence over the configuration parameter * jakarta.servlet.jsp.jstl.sql.dataSource. */ + @Test public void positiveQueryDataSourceConfigPrecedenceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryDataSourceConfigPrecedenceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryDataSourceConfigPrecedenceTest"); invoke(); @@ -257,7 +318,10 @@ public void positiveQueryDataSourceConfigPrecedenceTest() throws Exception { * parameter jakarta.servlet.jsp.jstl.sql.dataSource and setting it to a * DataSource Object. The query is passed as body content. */ + @Test public void positiveQueryDataSourceConfigDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryDataSourceConfigDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryDataSourceConfigDataSourceTest"); invoke(); @@ -273,7 +337,10 @@ public void positiveQueryDataSourceConfigDataSourceTest() throws Exception { * representing JDBC DriverManager parameters. The query is passed as body * content */ + @Test public void positiveQueryDataSourceConfigDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveQueryDataSourceConfigDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveQueryDataSourceConfigDriverManagerTest"); invoke(); @@ -287,7 +354,10 @@ public void positiveQueryDataSourceConfigDriverManagerTest() throws Exception { * @testStrategy: Validate the sql:query use of the sql attribute - That a * JspException is thrown when an invalid value is specified for sql. */ + @Test public void negativeQuerySQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQuerySQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQuerySQLAttributeTest"); invoke(); } @@ -300,7 +370,10 @@ public void negativeQuerySQLAttributeTest() throws Exception { * @testStrategy: Validate the sql:query use of the maxRows attribute - That a * JspException is thrown when an value < -1 is specified for maxRows. */ + @Test public void negativeQueryMaxRowsAttributeTest2() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryMaxRowsAttributeTest2.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryMaxRowsAttributeTest2"); invoke(); } @@ -314,7 +387,10 @@ public void negativeQueryMaxRowsAttributeTest2() throws Exception { * jakarta.servlet.jsp.sql.jstl.maxRows config parameter - That a JspException * is thrown when an invalid value is specified. */ + @Test public void negativeQueryMaxRowsConfigTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryMaxRowsConfigTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryMaxRowsConfigTest"); invoke(); } @@ -328,7 +404,10 @@ public void negativeQueryMaxRowsConfigTest() throws Exception { * jakarta.servlet.jsp.sql.jstl.maxRows config parameter - That a JspException * is thrown when an value < -1 is specified. */ + @Test public void negativeQueryMaxRowsConfigTest2() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryMaxRowsConfigTest2.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryMaxRowsConfigTest2"); invoke(); } @@ -341,6 +420,7 @@ public void negativeQueryMaxRowsConfigTest2() throws Exception { * @testStrategy: Validate that if a sql:query utilizes the scope attribute * that is invalid, that a translation error will occur. */ + @Test public void negativeQueryScopeAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeQueryScopeAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeQueryScopeAttributeTest.jsp"); @@ -356,6 +436,7 @@ public void negativeQueryScopeAttributeTest() throws Exception { * @testStrategy: Validate the sql:query action that when the var attribute is * not specified, a translation error occurs. */ + @Test public void negativeQueryNoVarAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeQueryNoVarAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeQueryNoVarAttributeTest.jsp"); @@ -371,6 +452,7 @@ public void negativeQueryNoVarAttributeTest() throws Exception { * @testStrategy: Validate the sql:query action that when the var attribute is * empty, a translation error occurs. */ + @Test public void negativeQueryVarAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeQueryVarAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeQueryVarAttributeTest.jsp"); @@ -387,7 +469,10 @@ public void negativeQueryVarAttributeTest() throws Exception { * a JspException is thrown when an invalid value is specified for sql. via * body content. */ + @Test public void negativeQueryBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryBodyContentTest"); invoke(); } @@ -401,7 +486,10 @@ public void negativeQueryBodyContentTest() throws Exception { * That a JspException is thrown when an invalid value is specified for * dataSource. */ + @Test public void negativeQueryDataSourceAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryDataSourceAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryDataSourceAttributeTest"); invoke(); } @@ -415,7 +503,10 @@ public void negativeQueryDataSourceAttributeTest() throws Exception { * Object which is uninitialized for the dataSource attribute will generate a * JspException. */ + @Test public void negativeQueryDataSourceAttributeEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryDataSourceAttributeEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryDataSourceAttributeEmptyTest"); invoke(); @@ -429,7 +520,10 @@ public void negativeQueryDataSourceAttributeEmptyTest() throws Exception { * @testStrategy: Validate the sql:query action which specifies null for the * dataSource attribute will generate a JspException. */ + @Test public void negativeQueryDataSourceNullAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeQueryDataSourceNullAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeQueryDataSourceNullAttributeTest"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java similarity index 52% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java index 9b6571de42..28ad0fd02c 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java @@ -20,50 +20,53 @@ package com.sun.ts.tests.jstl.spec.sql.result; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/result"); setContextRoot("/jstl_sql_result_web"); setGoldenFileDir("/jstl/spec/sql/result"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_result_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_result_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetColumnNamesCountTest.jsp")), "positiveResultGetColumnNamesCountTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetColumnNamesTest.jsp")), "positiveResultGetColumnNamesTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsByIndexCountTest.jsp")), "positiveResultGetRowsByIndexCountTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsByIndexTest.jsp")), "positiveResultGetRowsByIndexTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsCountTest.jsp")), "positiveResultGetRowsCountTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsLowerCaseTest.jsp")), "positiveResultGetRowsLowerCaseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultGetRowsUpperCaseTest.jsp")), "positiveResultGetRowsUpperCaseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveResultIsLimitedByMaxRowsTest.jsp")), "positiveResultIsLimitedByMaxRowsTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -75,7 +78,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * executed using maxRows attribute returns the correct value for * Result.isLimitedByMaxRows() */ + @Test public void positiveResultIsLimitedByMaxRowsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultIsLimitedByMaxRowsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultIsLimitedByMaxRowsTest"); invoke(); } @@ -88,7 +94,10 @@ public void positiveResultIsLimitedByMaxRowsTest() throws Exception { * @testStrategy: Validate the access to Result.getRows is case insensitive. - * For a row returned by getRows(), specify the column names in lower case. */ + @Test public void positiveResultGetRowsLowerCaseTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsLowerCaseTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetRowsLowerCaseTest"); invoke(); } @@ -101,7 +110,10 @@ public void positiveResultGetRowsLowerCaseTest() throws Exception { * @testStrategy: Validate the access to Result.getRows is case insensitive. - * For a row returned by getRows(), specify the column names in upper case. */ + @Test public void positiveResultGetRowsUpperCaseTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsUpperCaseTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetRowsUpperCaseTest"); invoke(); } @@ -114,7 +126,10 @@ public void positiveResultGetRowsUpperCaseTest() throws Exception { * @testStrategy: Validate the values returned by Result.getColumns can be * used to access the column values returned by Result.getRows(). */ + @Test public void positiveResultGetColumnNamesTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetColumnNamesTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetColumnNamesTest"); invoke(); } @@ -127,7 +142,10 @@ public void positiveResultGetColumnNamesTest() throws Exception { * @testStrategy: Validate that you can access each column for a given row * which is returned by Result.getRowsByIndex(). */ + @Test public void positiveResultGetRowsByIndexTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsByIndexTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetRowsByIndexTest"); invoke(); } @@ -140,7 +158,10 @@ public void positiveResultGetRowsByIndexTest() throws Exception { * @testStrategy: Validate that the correct number of rows is returned by * Result.getRowsByIndex(). */ + @Test public void positiveResultGetRowsByIndexCountTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsByIndexCountTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetRowsByIndexCountTest"); invoke(); } @@ -153,7 +174,10 @@ public void positiveResultGetRowsByIndexCountTest() throws Exception { * @testStrategy: Validate that the correct number of rows is returned by * Result.getRows(). */ + @Test public void positiveResultGetRowsCountTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetRowsCountTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetRowsCountTest"); invoke(); } @@ -166,7 +190,10 @@ public void positiveResultGetRowsCountTest() throws Exception { * @testStrategy: Validate that the correct number of columns is returned by * Result.getColumnNames(). */ + @Test public void positiveResultGetColumnNamesCountTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveResultGetColumnNamesCountTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveResultGetColumnNamesCountTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java index 56537261b3..7dc97c2134 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java @@ -20,50 +20,67 @@ package com.sun.ts.tests.jstl.spec.sql.setdatasource; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ - - /** Creates new JSTLClient */ - public JSTLClient() { - } +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /* - * public methods - * ======================================================================== - */ + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/setdatasource"); setContextRoot("/jstl_sql_setdatasource_web"); setGoldenFileDir("/jstl/spec/sql/setdatasource"); + } - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_setdatasource_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_setdatasource_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp")), "negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp")), "negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp")), "negativeSetDataSourceDataSourceAttributeEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetDataSourceDataSourceNullAttributeTest.jsp")), "negativeSetDataSourceDataSourceNullAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetDataSourceScopeAttributeTest.jsp")), "negativeSetDataSourceScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceQueryDataSourceTest.jsp")), "positiveSetDataSourceQueryDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceQueryDriverManagerTest.jsp")), "positiveSetDataSourceQueryDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp")), "positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp")), "positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceQueryURLTest.jsp")), "positiveSetDataSourceQueryURLTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceScopeNoVarAttributeTest.jsp")), "positiveSetDataSourceScopeNoVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceScopeVarAttributeTest.jsp")), "positiveSetDataSourceScopeVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceTxDataSourceTest.jsp")), "positiveSetDataSourceTxDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceTxDriverManagerTest.jsp")), "positiveSetDataSourceTxDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp")), "positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp")), "positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceTxURLTest.jsp")), "positiveSetDataSourceTxURLTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceUpdateDataSourceTest.jsp")), "positiveSetDataSourceUpdateDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceUpdateDriverManagerTest.jsp")), "positiveSetDataSourceUpdateDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp")), "positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp")), "positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDataSourceUpdateURLTest.jsp")), "positiveSetDataSourceUpdateURLTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -78,7 +95,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * DriverManager properties (URL, driver, user, password) The query is passed * as body content. */ + @Test public void positiveSetDataSourceQueryDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceQueryDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceQueryDriverManagerTest"); invoke(); @@ -95,7 +115,10 @@ public void positiveSetDataSourceQueryDriverManagerTest() throws Exception { * a dataSource attribute to sql:setDataSource which contains a DataSource * Object. The query is passed as body content. */ + @Test public void positiveSetDataSourceQueryDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceQueryDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceQueryDataSourceTest"); invoke(); @@ -112,7 +135,10 @@ public void positiveSetDataSourceQueryDataSourceTest() throws Exception { * sql:setDataSource the attributes: url, driver, user and password. The query * is passed as body content. */ + @Test public void positiveSetDataSourceQueryURLTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceQueryURLTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceQueryURLTest"); invoke(); } @@ -127,7 +153,10 @@ public void positiveSetDataSourceQueryURLTest() throws Exception { * DriverManager properties (URL, driver, user, password) The query is passed * as body content. */ + @Test public void positiveSetDataSourceUpdateDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceUpdateDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceUpdateDriverManagerTest"); invoke(); @@ -144,7 +173,10 @@ public void positiveSetDataSourceUpdateDriverManagerTest() throws Exception { * a dataSource attribute to sql:setDataSource which contains a DataSource * Object. The query is passed as body content. */ + @Test public void positiveSetDataSourceUpdateDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceUpdateDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceUpdateDataSourceTest"); invoke(); @@ -161,7 +193,10 @@ public void positiveSetDataSourceUpdateDataSourceTest() throws Exception { * sql:setDataSource the attributes: url, driver, user and password. The query * is passed as body content. */ + @Test public void positiveSetDataSourceUpdateURLTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceUpdateURLTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceUpdateURLTest"); invoke(); } @@ -178,7 +213,10 @@ public void positiveSetDataSourceUpdateURLTest() throws Exception { * DriverManager properties (URL, driver, user, password) The query is passed * as body content. */ + @Test public void positiveSetDataSourceTxDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceTxDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceTxDriverManagerTest"); invoke(); @@ -195,7 +233,10 @@ public void positiveSetDataSourceTxDriverManagerTest() throws Exception { * specifying a dataSource attribute to sql:setDataSource which contains a * DataSource Object. The query is passed as body content. */ + @Test public void positiveSetDataSourceTxDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceTxDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceTxDataSourceTest"); invoke(); } @@ -209,7 +250,10 @@ public void positiveSetDataSourceTxDataSourceTest() throws Exception { * specifying sql:setDataSource the attributes: url, driver, user and * password. The query is passed as body content. */ + @Test public void positiveSetDataSourceTxURLTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceTxURLTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceTxURLTest"); invoke(); } @@ -223,8 +267,11 @@ public void positiveSetDataSourceTxURLTest() throws Exception { * jakarta.servlet.jsp.jstl.sql.dataSource to JDBC DriverManager properties * (URL, driver, user, password) The query is passed as body content. */ + @Test public void positiveSetDataSourceQueryNoVarAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceQueryNoVarAttributeDriverManagerTest"); invoke(); @@ -239,8 +286,11 @@ public void positiveSetDataSourceQueryNoVarAttributeDriverManagerTest() * jakarta.servlet.jsp.jstl.sql.dataSource to a DataSource Object. The query is * passed as body content. */ + @Test public void positiveSetDataSourceQueryNoVarAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceQueryNoVarAttributeDataSourceTest"); invoke(); @@ -255,8 +305,11 @@ public void positiveSetDataSourceQueryNoVarAttributeDataSourceTest() * jakarta.servlet.jsp.jstl.sql.dataSource to JDBC DriverManager properties * (URL, driver, user, password) The query is passed as body content. */ + @Test public void positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest"); invoke(); @@ -271,8 +324,11 @@ public void positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest() * jakarta.servlet.jsp.jstl.sql.dataSource to a DataSource Object. The query is * passed as body content. */ + @Test public void positiveSetDataSourceUpdateNoVarAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceUpdateNoVarAttributeDataSourceTest"); invoke(); @@ -288,8 +344,11 @@ public void positiveSetDataSourceUpdateNoVarAttributeDataSourceTest() * properties (URL, driver, user, password) The query is passed as body * content. */ + @Test public void positiveSetDataSourceTxNoVarAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceTxNoVarAttributeDriverManagerTest"); invoke(); @@ -304,8 +363,11 @@ public void positiveSetDataSourceTxNoVarAttributeDriverManagerTest() * setting jakarta.servlet.jsp.jstl.sql.dataSource to a DataSource Object. The * query is passed as body content. */ + @Test public void positiveSetDataSourceTxNoVarAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceTxNoVarAttributeDataSourceTest"); invoke(); @@ -320,7 +382,10 @@ public void positiveSetDataSourceTxNoVarAttributeDataSourceTest() * @testStrategy: Validate sql:setDataSource exports the var attribute to the * correct scope. */ + @Test public void positiveSetDataSourceScopeVarAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDataSourceScopeVarAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetDataSourceScopeVarAttributeTest"); invoke(); @@ -335,6 +400,7 @@ public void positiveSetDataSourceScopeVarAttributeTest() throws Exception { * @testStrategy: Validate sql:setDataSource exports the var attribute to the * correct scope. */ + @Test public void positiveSetDataSourceScopeNoVarAttributeTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_sql_setdatasource_web/positiveSetDataSourceScopeNoVarAttributeTest.jsp HTTP/1.1"); @@ -351,8 +417,11 @@ public void positiveSetDataSourceScopeNoVarAttributeTest() throws Exception { * @testStrategy: Pass an invalid String as the dataSource attribute to * sql:setDataSource */ + @Test public void negativeSetDataSourceDataSourceAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetDataSourceDataSourceAttributeDriverManagerTest"); invoke(); @@ -366,6 +435,7 @@ public void negativeSetDataSourceDataSourceAttributeDriverManagerTest() * @testStrategy: Validate that if a sql:setDataSource action utilizes the * scope attribute that is invalid, that a translation error will occur. */ + @Test public void negativeSetDataSourceScopeAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeSetDataSourceScopeAttributeTest"); @@ -383,8 +453,11 @@ public void negativeSetDataSourceScopeAttributeTest() throws Exception { * @testStrategy: Pass an invalid Object as the dataSource attribute to * sql:setDataSource */ + @Test public void negativeSetDataSourceDataSourceAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetDataSourceDataSourceAttributeDataSourceTest"); invoke(); @@ -398,7 +471,10 @@ public void negativeSetDataSourceDataSourceAttributeDataSourceTest() * @testStrategy: Validate the sql:setDataSource action which specifies a null * for the dataSource attribute will generate a JspException. */ + @Test public void negativeSetDataSourceDataSourceNullAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetDataSourceDataSourceNullAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetDataSourceDataSourceNullAttributeTest"); invoke(); @@ -413,7 +489,10 @@ public void negativeSetDataSourceDataSourceNullAttributeTest() throws Exception * DataSource Object which is uninitialized for the dataSource attribute will * generate a JspException the first attempt to use it. */ + @Test public void negativeSetDataSourceDataSourceAttributeEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetDataSourceDataSourceAttributeEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetDataSourceDataSourceAttributeEmptyTest"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java index 63c43b6adf..1c677cc28e 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java @@ -20,50 +20,65 @@ package com.sun.ts.tests.jstl.spec.sql.transaction; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/transaction"); setContextRoot("/jstl_sql_transaction_web"); setGoldenFileDir("/jstl/spec/sql/transaction"); + } + + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_transaction_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_transaction_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxDataSourceAttributeEmptyTest.jsp")), "negativeTxDataSourceAttributeEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxDataSourceAttributeTest.jsp")), "negativeTxDataSourceAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxDataSourceNullAttributeTest.jsp")), "negativeTxDataSourceNullAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxIsolationLevelAttributeTest.jsp")), "negativeTxIsolationLevelAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxQueryDataSourceAttributeTest.jsp")), "negativeTxQueryDataSourceAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTxUpdateDataSourceAttributeTest.jsp")), "negativeTxUpdateDataSourceAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxCommitLifeCycleTest.jsp")), "positiveTxCommitLifeCycleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxDataSourceAttributeDataSourceTest.jsp")), "positiveTxDataSourceAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxDataSourceAttributeDriverManagerTest.jsp")), "positiveTxDataSourceAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxDataSourceConfigDataSourceTest.jsp")), "positiveTxDataSourceConfigDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxDataSourceConfigDriverManagerTest.jsp")), "positiveTxDataSourceConfigDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxDataSourceConfigPrecedenceTest.jsp")), "positiveTxDataSourceConfigPrecedenceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxIsolationAttributeSerializable.jsp")), "positiveTxIsolationAttributeSerializable.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxQueryCommitTest.jsp")), "positiveTxQueryCommitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxQueryParamCommitTest.jsp")), "positiveTxQueryParamCommitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxRollbackLifeCycleTest.jsp")), "positiveTxRollbackLifeCycleTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxUpdateCommitTest.jsp")), "positiveTxUpdateCommitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxUpdateParamCommitTest.jsp")), "positiveTxUpdateParamCommitTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTxUpdateRollbackTest.jsp")), "positiveTxUpdateRollbackTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } /* @@ -77,7 +92,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * configuration parameter - The datasource attribute takes precedence over * jakarta.servlet.jsp.jstl.sql.dataSource */ + @Test public void positiveTxDataSourceConfigDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxDataSourceConfigDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxDataSourceConfigDataSourceTest"); invoke(); @@ -93,7 +111,10 @@ public void positiveTxDataSourceConfigDataSourceTest() throws Exception { * representing JDBC DriverManager parameters. The query is passed as body * content */ + @Test public void positiveTxDataSourceConfigDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxDataSourceConfigDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxDataSourceConfigDriverManagerTest"); invoke(); @@ -108,7 +129,10 @@ public void positiveTxDataSourceConfigDriverManagerTest() throws Exception { * precedence over the configuration parameter * jakarta.servlet.jsp.jstl.sql.dataSource. */ + @Test public void positiveTxDataSourceConfigPrecedenceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxDataSourceConfigPrecedenceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxDataSourceConfigPrecedenceTest"); invoke(); @@ -122,7 +146,10 @@ public void positiveTxDataSourceConfigPrecedenceTest() throws Exception { * @testStrategy: Validate sql:transaction action specifying a DataSource * Object for the dataSource attribute. The query is passed as body content. */ + @Test public void positiveTxDataSourceAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxDataSourceAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxDataSourceAttributeDataSourceTest"); invoke(); @@ -138,7 +165,10 @@ public void positiveTxDataSourceAttributeDataSourceTest() throws Exception { * attribute which contains JDBC DriverManager properties (URL, driver, user, * password) The query is passed as body content. */ + @Test public void positiveTxDataSourceAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxDataSourceAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxDataSourceAttributeDriverManagerTest"); invoke(); @@ -152,7 +182,10 @@ public void positiveTxDataSourceAttributeDriverManagerTest() throws Exception { * @testStrategy: Validate sql:transaction and sql:query actions allow a query * to be successfully executed. */ + @Test public void positiveTxQueryCommitTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxQueryCommitTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxQueryCommitTest"); invoke(); } @@ -165,7 +198,10 @@ public void positiveTxQueryCommitTest() throws Exception { * @testStrategy: Validate sql:transaction and sql:update actions allow a * query to be successfully committed. */ + @Test public void positiveTxUpdateCommitTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxUpdateCommitTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxUpdateCommitTest"); invoke(); } @@ -179,7 +215,10 @@ public void positiveTxUpdateCommitTest() throws Exception { * query to be successfully rolled back when an SQLException occurs during the * transaction. */ + @Test public void positiveTxUpdateRollbackTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxUpdateRollbackTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxUpdateRollbackTest"); invoke(); } @@ -192,7 +231,10 @@ public void positiveTxUpdateRollbackTest() throws Exception { * @testStrategy: Validate sql:transaction will set the isolation attribute to * serializable. */ + @Test public void positiveTxIsolationAttributeSerializable() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxIsolationAttributeSerializable.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxIsolationAttributeSerializable"); invoke(); @@ -206,7 +248,10 @@ public void positiveTxIsolationAttributeSerializable() throws Exception { * @testStrategy: Validate sql:transaction action lifecycle for a committed * transaction. */ + @Test public void positiveTxCommitLifeCycleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxCommitLifeCycleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxCommitLifeCycleTest"); invoke(); } @@ -219,7 +264,10 @@ public void positiveTxCommitLifeCycleTest() throws Exception { * @testStrategy: Validate sql:transaction action lifecyle for a transaction * that is rolled back */ + @Test public void positiveTxRollbackLifeCycleTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxRollbackLifeCycleTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxRollbackLifeCycleTest"); invoke(); } @@ -232,7 +280,10 @@ public void positiveTxRollbackLifeCycleTest() throws Exception { * @testStrategy: Validate sql:transaction, sql:query and sql:param actions * allow for a query to be executed successfully. */ + @Test public void positiveTxQueryParamCommitTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxQueryParamCommitTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxQueryParamCommitTest"); invoke(); } @@ -245,7 +296,10 @@ public void positiveTxQueryParamCommitTest() throws Exception { * @testStrategy: Validate sql:transaction, sql:update and sql:param actions * allow for a query to be executed successfully. */ + @Test public void positiveTxUpdateParamCommitTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTxUpdateParamCommitTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTxUpdateParamCommitTest"); invoke(); } @@ -258,7 +312,10 @@ public void positiveTxUpdateParamCommitTest() throws Exception { * @testStrategy: Validate the sql:transaction action which specifies an * invalid DataType for the dataSource attribute will generate a JspException. */ + @Test public void negativeTxDataSourceAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeTxDataSourceAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeTxDataSourceAttributeTest"); invoke(); } @@ -272,7 +329,10 @@ public void negativeTxDataSourceAttributeTest() throws Exception { * DataSource Object which is null for the dataSource attribute will generate * a JspException. */ + @Test public void negativeTxDataSourceNullAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeTxDataSourceNullAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeTxDataSourceNullAttributeTest"); invoke(); } @@ -286,7 +346,10 @@ public void negativeTxDataSourceNullAttributeTest() throws Exception { * DataSource Object which is uninitialized for the dataSource attribute will * generate a JspException. */ + @Test public void negativeTxDataSourceAttributeEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeTxDataSourceAttributeEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeTxDataSourceAttributeEmptyTest"); invoke(); } @@ -299,6 +362,7 @@ public void negativeTxDataSourceAttributeEmptyTest() throws Exception { * @testStrategy: Validate that if a sql:transaction utilizes an invalid * isolationLevel attribute, that a translation error will occur. */ + @Test public void negativeTxIsolationLevelAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeTxIsolationLevelAttributeTest"); TEST_PROPS.setProperty(REQUEST, @@ -316,6 +380,7 @@ public void negativeTxIsolationLevelAttributeTest() throws Exception { * action that specifies a dataSource attribute that a translation error * occurs. */ + @Test public void negativeTxQueryDataSourceAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeTxQueryDataSourceAttributeTest"); TEST_PROPS.setProperty(REQUEST, @@ -333,6 +398,7 @@ public void negativeTxQueryDataSourceAttributeTest() throws Exception { * action that specifies a dataSource attribute that a translation error * occurs. */ + @Test public void negativeTxUpdateDataSourceAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeTxUpdateDataSourceAttributeTest"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java index 6412f00270..ab3d575928 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java @@ -20,50 +20,68 @@ package com.sun.ts.tests.jstl.spec.sql.update; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.SqlUrlClient; -public class JSTLClient extends SqlUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; jstl.db.url; - * jstl.db.user; jstl.db.password; jstl.db.driver; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends SqlUrlClient { - /** Creates new JSTLClient */ - public JSTLClient() { - } + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } - - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + /** Creates new JSTLClient */ + public JSTLClientIT() { setGeneralURI("/jstl/spec/sql/update"); setContextRoot("/jstl_sql_update_web"); setGoldenFileDir("/jstl/spec/sql/update"); + } + - return super.run(args, out, err); + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_sql_update_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_sql_update_web.xml")); + + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativesetDataSourceScopeAttributeTest.jsp")), "negativesetDataSourceScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateBodyContentTest.jsp")), "negativeUpdateBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateDataSourceAttributeEmptyTest.jsp")), "negativeUpdateDataSourceAttributeEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateDataSourceAttributeTest.jsp")), "negativeUpdateDataSourceAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateDataSourceNullAttributeTest.jsp")), "negativeUpdateDataSourceNullAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateScopeAttributeTest.jsp")), "negativeUpdateScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateScopeVarAttributeTest.jsp")), "negativeUpdateScopeVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateSQLAttributeTest.jsp")), "negativeUpdateSQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateSQLAttributeTest2.jsp")), "negativeUpdateSQLAttributeTest2.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUpdateVarAttributeTest.jsp")), "negativeUpdateVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateBodyContentTest.jsp")), "positiveUpdateBodyContentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateDataSourceAttributeDataSourceTest.jsp")), "positiveUpdateDataSourceAttributeDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateDataSourceAttributeDriverManagerTest.jsp")), "positiveUpdateDataSourceAttributeDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateDataSourceConfigDataSourceTest.jsp")), "positiveUpdateDataSourceConfigDataSourceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateDataSourceConfigDriverManagerTest.jsp")), "positiveUpdateDataSourceConfigDriverManagerTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateDataSourceConfigPrecedenceTest.jsp")), "positiveUpdateDataSourceConfigPrecedenceTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateNoRowsResultTest.jsp")), "positiveUpdateNoRowsResultTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateNoVarAttributeTest.jsp")), "positiveUpdateNoVarAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateRowsResultTest.jsp")), "positiveUpdateRowsResultTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateScopeAttributeTest.jsp")), "positiveUpdateScopeAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateSQLAttributeTest.jsp")), "positiveUpdateSQLAttributeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveUpdateVarAttributeTest.jsp")), "positiveUpdateVarAttributeTest.jsp"); + + archive.addAsWebInfResource(JSTLClientIT.class.getPackage(), "tssql.stmt", "jstl-sql.properties"); + + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } /* @@ -75,7 +93,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * That a query can be successfully executed when the dataSource attribute is * passed an instance of a DataSource. */ + @Test public void positiveUpdateDataSourceAttributeDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateDataSourceAttributeDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateDataSourceAttributeDataSourceTest"); invoke(); @@ -90,8 +111,11 @@ public void positiveUpdateDataSourceAttributeDataSourceTest() throws Exception { * which contains JDBC DriverManager properties (URL, driver, user, password) * The query is passed as body content. */ + @Test public void positiveUpdateDataSourceAttributeDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateDataSourceAttributeDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateDataSourceAttributeDriverManagerTest"); invoke(); @@ -107,7 +131,10 @@ public void positiveUpdateDataSourceAttributeDriverManagerTest() * as well as validating that if scope is not specified, var will be exported * to the page scope by default. */ + @Test public void positiveUpdateScopeAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateScopeAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateScopeAttributeTest"); invoke(); } @@ -120,7 +147,10 @@ public void positiveUpdateScopeAttributeTest() throws Exception { * @testStrategy: Validate the sql:update use of the var attribute - That * scoped var attribute returned is of type java.lang.Integer. */ + @Test public void positiveUpdateVarAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateVarAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateVarAttributeTest"); invoke(); } @@ -133,7 +163,10 @@ public void positiveUpdateVarAttributeTest() throws Exception { * @testStrategy: Validate the sql:update can successfully execute a query * when the var attribute is not specified. */ + @Test public void positiveUpdateNoVarAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateNoVarAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateNoVarAttributeTest"); invoke(); } @@ -147,7 +180,10 @@ public void positiveUpdateNoVarAttributeTest() throws Exception { * scoped var attribute returned is equal to 0 if the SQL statement does not * affect any rows. */ + @Test public void positiveUpdateNoRowsResultTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateNoRowsResultTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateNoRowsResultTest"); invoke(); } @@ -161,7 +197,10 @@ public void positiveUpdateNoRowsResultTest() throws Exception { * scoped var attribute returned is equal to the number of rows affected by * the SQL statement. */ + @Test public void positiveUpdateRowsResultTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateRowsResultTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateRowsResultTest"); invoke(); } @@ -174,7 +213,10 @@ public void positiveUpdateRowsResultTest() throws Exception { * @testStrategy: Validate the sql:update action - That a SQL query can be * passed as body content. */ + @Test public void positiveUpdateBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateBodyContentTest"); invoke(); } @@ -187,7 +229,10 @@ public void positiveUpdateBodyContentTest() throws Exception { * @testStrategy: Validate the sql:update use of the sql attribute - That sql * attribute can be specified in order to execute a SQL statement. */ + @Test public void positiveUpdateSQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateSQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateSQLAttributeTest"); invoke(); } @@ -202,7 +247,10 @@ public void positiveUpdateSQLAttributeTest() throws Exception { * body content. - that jakarta.servlet.jsp.jstl.sql.dataSource can be provided * a DataSource. */ + @Test public void positiveUpdateDataSourceConfigDataSourceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateDataSourceConfigDataSourceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateDataSourceConfigDataSourceTest"); invoke(); @@ -218,7 +266,10 @@ public void positiveUpdateDataSourceConfigDataSourceTest() throws Exception { * representing JDBC DriverManager parameters. The query is passed as body * content */ + @Test public void positiveUpdateDataSourceConfigDriverManagerTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateDataSourceConfigDriverManagerTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateDataSourceConfigDriverManagerTest"); invoke(); @@ -233,7 +284,10 @@ public void positiveUpdateDataSourceConfigDriverManagerTest() throws Exception { * precedence over the configuration parameter * jakarta.servlet.jsp.jstl.sql.dataSource. */ + @Test public void positiveUpdateDataSourceConfigPrecedenceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveUpdateDataSourceConfigPrecedenceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveUpdateDataSourceConfigPrecedenceTest"); invoke(); @@ -248,7 +302,10 @@ public void positiveUpdateDataSourceConfigPrecedenceTest() throws Exception { * That a JspException is thrown when an invalid Datatype is specified for sql * attribute. */ + @Test public void negativeUpdateSQLAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateSQLAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateSQLAttributeTest"); invoke(); } @@ -262,7 +319,10 @@ public void negativeUpdateSQLAttributeTest() throws Exception { * That a JspException is thrown when an invalid SQL query is specified for * sql. */ + @Test public void negativeUpdateSQLAttributeTest2() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateSQLAttributeTest2.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateSQLAttributeTest2"); invoke(); } @@ -276,7 +336,10 @@ public void negativeUpdateSQLAttributeTest2() throws Exception { * That a JspException is thrown when an invalid SQL query is specified via * body content. */ + @Test public void negativeUpdateBodyContentTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateBodyContentTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateBodyContentTest"); invoke(); } @@ -289,6 +352,7 @@ public void negativeUpdateBodyContentTest() throws Exception { * @testStrategy: Validate the sql:update var attribute - That a translation * error occurs when the var attribute is empty. */ + @Test public void negativeUpdateVarAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeUpdateVarAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeUpdateVarAttributeTest.jsp"); @@ -304,6 +368,7 @@ public void negativeUpdateVarAttributeTest() throws Exception { * @testStrategy: Validate that if a sql:update action utilizes the scope * attribute that is invalid, that a translation error will occur. */ + @Test public void negativeUpdateScopeAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeUpdateScopeAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeUpdateScopeAttributeTest.jsp"); @@ -320,6 +385,7 @@ public void negativeUpdateScopeAttributeTest() throws Exception { * That a translation error occurs when the scope attribute is specified and * the var attribute is not. */ + @Test public void negativeUpdateScopeVarAttributeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeUpdateScopeVarAttributeTest"); TEST_PROPS.setProperty(REQUEST, "negativeUpdateScopeVarAttributeTest.jsp"); @@ -335,7 +401,10 @@ public void negativeUpdateScopeVarAttributeTest() throws Exception { * @testStrategy: Validate the sql:update action which specifies an invalid * DataType for the dataSource attribute will generate a JspException. */ + @Test public void negativeUpdateDataSourceAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateDataSourceAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateDataSourceAttributeTest"); invoke(); } @@ -349,7 +418,10 @@ public void negativeUpdateDataSourceAttributeTest() throws Exception { * Object which is null for the dataSource attribute will generate a * JspException. */ + @Test public void negativeUpdateDataSourceNullAttributeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateDataSourceNullAttributeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateDataSourceNullAttributeTest"); invoke(); @@ -364,7 +436,10 @@ public void negativeUpdateDataSourceNullAttributeTest() throws Exception { * Object which is uninitialized for the dataSource attribute will generate a * JspException. */ + @Test public void negativeUpdateDataSourceAttributeEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeUpdateDataSourceAttributeEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeUpdateDataSourceAttributeEmptyTest"); invoke(); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java similarity index 65% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java index d0e4dd3906..aa66d2bb10 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java @@ -14,56 +14,55 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ -package com.sun.ts.tests.jstl.spec.xml.xconditional.xcwo; -import java.io.PrintWriter; +package com.sun.ts.tests.jstl.spec.xml.xconditional.xcwo; -import com.sun.javatest.Status; +import java.io.IOException; +import java.io.InputStream; +import java.io.IOException; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xcwo_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xcwo_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xcwo_web.xml")); - setContextRoot("/jstl_xml_xcwo_web"); - setGoldenFileDir("/jstl/spec/xml/xconditional/xcwo"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWONoWhenActionsTest.jsp")), "negativeCWONoWhenActionsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOOtherwiseNoParentTest.jsp")), "negativeCWOOtherwiseNoParentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenBeforeOtherwiseTest.jsp")), "negativeCWOWhenBeforeOtherwiseTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenNoParentTest.jsp")), "negativeCWOWhenNoParentTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenSelectFailureTest.jsp")), "negativeCWOWhenSelectFailureTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeCWOWhenSelectReqAttrTest.jsp")), "negativeCWOWhenSelectReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCWOTest.jsp")), "positiveCWOTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveCWOWhiteSpaceTest.jsp")), "positiveCWOWhiteSpaceTest.jsp"); - return super.run(args, out, err); + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } + /* * @testName: positiveCWOTest * @@ -79,7 +78,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * evaluates to true, and an c:otherwise action is present, the body content * of the action is processed. */ + @Test public void positiveCWOTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCWOTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveCWOTest"); invoke(); } @@ -93,7 +95,10 @@ public void positiveCWOTest() throws Exception { * whitespace is intermixed with choose's nested when and otherwise actions. * No translation error should occur. */ + @Test public void positiveCWOWhiteSpaceTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveCWOWhiteSpaceTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveCWOWhiteSpaceTest"); invoke(); } @@ -106,6 +111,7 @@ public void positiveCWOWhiteSpaceTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the choose * action has no nested when actions. */ + @Test public void negativeCWONoWhenActionsTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWONoWhenActionsTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWONoWhenActionsTest.jsp"); @@ -121,6 +127,7 @@ public void negativeCWONoWhenActionsTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if otherwise * appears before when or if when appears after otherwise. */ + @Test public void negativeCWOWhenBeforeOtherwiseTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenBeforeOtherwiseTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenBeforeOtherwiseTest.jsp"); @@ -136,6 +143,7 @@ public void negativeCWOWhenBeforeOtherwiseTest() throws Exception { * @testStrategy: Validate a fatal translation error occurs if a when action * has no choose as an immediate parent. */ + @Test public void negativeCWOWhenNoParentTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenNoParentTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenNoParentTest.jsp"); @@ -151,6 +159,7 @@ public void negativeCWOWhenNoParentTest() throws Exception { * @testStrategy: Validate a fatal translation error occurs if an otherwise * action has no choose as an immediate parent. */ + @Test public void negativeCWOOtherwiseNoParentTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOOtherwiseNoParentTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOOtherwiseNoParentTest.jsp"); @@ -166,6 +175,7 @@ public void negativeCWOOtherwiseNoParentTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if a nested * when action has no select attribute. */ + @Test public void negativeCWOWhenSelectReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeCWOWhenSelectReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeCWOWhenSelectReqAttrTest.jsp"); @@ -182,7 +192,10 @@ public void negativeCWOWhenSelectReqAttrTest() throws Exception { * the when action fails to evaluated an instance of * jakarta.servlet.jsp.JspException is thrown. */ + @Test public void negativeCWOWhenSelectFailureTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeCWOWhenSelectFailureTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeCWOWhenSelectFailureTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java index a2841afe38..00072dfa0c 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java @@ -14,56 +14,60 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xconditional.xforeach; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + + - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xforeach_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xforeach_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xforeach_web.xml")); - setContextRoot("/jstl_xml_xforeach_web"); - setGoldenFileDir("/jstl/spec/xml/xconditional/xforeach"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachVarTest.jsp")), "positiveForEachVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachVarStatusTest.jsp")), "positiveForEachVarStatusTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachStepTest.jsp")), "positiveForEachStepTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachSelectTest.jsp")), "positiveForEachSelectTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachSelectEmptyTest.jsp")), "positiveForEachSelectEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachEndTest.jsp")), "positiveForEachEndTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachEndLTBeginTest.jsp")), "positiveForEachEndLTBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForEachBeginTest.jsp")), "positiveForEachBeginTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeForEachSelectReqAttrTest.jsp")), "negativeForEachSelectReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeForEachSelectFailureTest.jsp")), "negativeForEachSelectFailureTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveForEachSelectTest * @@ -73,7 +77,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * through a node-set returned by the evaluated of the XPath expression * provided. */ + @Test public void positiveForEachSelectTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachSelectTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachSelectTest"); invoke(); } @@ -88,7 +95,10 @@ public void positiveForEachSelectTest() throws Exception { * it is an instance of java.lang.Object. - Validate that var is available * within the body of the forEach action. */ + @Test public void positiveForEachVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachVarTest"); invoke(); } @@ -101,6 +111,7 @@ public void positiveForEachVarTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the select * attribute is not present. */ + @Test public void negativeForEachSelectReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeForEachSelectReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeForEachSelectReqAttrTest.jsp"); @@ -117,7 +128,10 @@ public void negativeForEachSelectReqAttrTest() throws Exception { * is thrown if the XPath expression provided to the select attribute fails to * evaluated. */ + @Test public void negativeForEachSelectFailureTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeForEachSelectFailureTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeForEachSelectFailureTest"); invoke(); } @@ -131,7 +145,10 @@ public void negativeForEachSelectFailureTest() throws Exception { * @test_Strategy: Validate the behavior of x:forEach when the begin attribute * is specified. */ + @Test public void positiveForEachBeginTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachBeginTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachBeginTest"); invoke(); } @@ -145,7 +162,10 @@ public void positiveForEachBeginTest() throws Exception { * @test_Strategy: Validate the behavior of x:forEach when the end attribute * is specified. */ + @Test public void positiveForEachEndTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachEndTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachEndTest"); invoke(); } @@ -158,7 +178,10 @@ public void positiveForEachEndTest() throws Exception { * @test_Strategy: Validate the behavior of the x:forEach action when the step * attribute is not specified. */ + @Test public void positiveForEachStepTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachStepTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachStepTest"); invoke(); } @@ -171,7 +194,10 @@ public void positiveForEachStepTest() throws Exception { * @test_Strategy: Validate the action properly exports a VarStatus object on * each iteration when the varStatus attribute is specified. */ + @Test public void positiveForEachVarStatusTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForEachVarStatusTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveForEachVarStatusTest"); invoke(); } @@ -184,6 +210,7 @@ public void positiveForEachVarStatusTest() throws Exception { * @test_Strategy: Validate that no iteration occurs of the end attribute * value is less than the value of the begin attribute. */ + @Test public void positiveForEachEndLTBeginTest() throws Exception { TEST_PROPS.setProperty(REQUEST, "GET /jstl_xml_xforeach_web/positiveForEachEndLTBeginTest.jsp HTTP/1.1"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java similarity index 61% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java index 65b5e6137d..5738a8b1d1 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java @@ -14,56 +14,54 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xconditional.xif; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xif_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xif_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xif_web.xml")); - setContextRoot("/jstl_xml_xif_web"); - setGoldenFileDir("/jstl/spec/xml/xconditional/xif"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfInvalidScopeTest.jsp")), "negativeIfInvalidScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfScopeVarTest.jsp")), "negativeIfScopeVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfSelectFailureTest.jsp")), "negativeIfSelectFailureTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeIfSelectReqAttrTest.jsp")), "negativeIfSelectReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfScopeTest.jsp")), "positiveIfScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfSelectTest.jsp")), "positiveIfSelectTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIfVarTest.jsp")), "positiveIfVarTest.jsp"); + + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveIfSelectTest * @@ -73,7 +71,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * select attribute, will, depending on the result cause the action to * process its body content. */ + @Test public void positiveIfSelectTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfSelectTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfSelectTest"); invoke(); } @@ -88,7 +89,10 @@ public void positiveIfSelectTest() throws Exception { * name provided to var. - if var is present, and the action has a body, the * body is still processed. */ + @Test public void positiveIfVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfVarTest"); invoke(); } @@ -103,7 +107,10 @@ public void positiveIfVarTest() throws Exception { * the scope attribute. If scope is not specified, var will be exported to the * page scope by default. */ + @Test public void positiveIfScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIfScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveIfScopeTest"); invoke(); } @@ -116,6 +123,7 @@ public void positiveIfScopeTest() throws Exception { * @testStrategy: Validate that if scope is provided an invalid value, a fatal * translation error occurs. */ + @Test public void negativeIfInvalidScopeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeIfInvalidScopeTest"); TEST_PROPS.setProperty(REQUEST, "negativeIfInvalidScopeTest.jsp"); @@ -132,6 +140,7 @@ public void negativeIfInvalidScopeTest() throws Exception { * having an action with no select. A fatal translation error should * occur. */ + @Test public void negativeIfSelectReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeIfSelectReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeIfSelectReqAttrTest.jsp"); @@ -147,6 +156,7 @@ public void negativeIfSelectReqAttrTest() throws Exception { * @testStrategy: Validate a fatal translation error occurs if scope is * specified by an action, but var is not. */ + @Test public void negativeIfScopeVarTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeIfScopeVarTest"); TEST_PROPS.setProperty(REQUEST, "negativeIfScopeVarTest.jsp"); @@ -163,7 +173,10 @@ public void negativeIfScopeVarTest() throws Exception { * is thrown if the XPath expression provided to the select attribute fails to * evaluate. */ + @Test public void negativeIfSelectFailureTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeIfSelectFailureTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeIfSelectFailureTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java similarity index 61% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java index 32c0c56356..cb6f22b881 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java @@ -14,56 +14,45 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xmlcore.bindings; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { - - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /** Creates new JSTLClient */ - public JSTLClient() { - } +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /* - * public methods - * ======================================================================== - */ + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); + /** Creates new JSTLClient */ + public JSTLClientIT() { + setContextRoot("/jstl_xml_bindings_web"); } - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - setContextRoot("/jstl_xml_bindings_web"); - setGoldenFileDir("/jstl/spec/xml/xmlcore/bindings"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_bindings_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_bindings_web.xml")); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXPathVariableBindingsTest.jsp")), "positiveXPathVariableBindingsTest.jsp"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveXPathVariableBindingsTest * @@ -83,14 +72,17 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * PageContext.SESSION_SCOPE) $applicationScope:foo - * pageContext.getAttribute("foo", PageContext.APPLICATION_SCOPE) */ + @Test public void positiveXPathVariableBindingsTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveXPathVariableBindingsTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(TEST_NAME, "positiveXPathVariableBindingsTest"); TEST_PROPS.setProperty(REQUEST, "positiveXPathVariableBindingsTest.jsp?param1=RequestParameter1"); TEST_PROPS.setProperty(REQUEST_HEADERS, "reqheader:RequestHeader|Cookie: $Version=1; mycookie=CookieFound; $Domain=" + _hostname + "; $Path=/jstl_xml_bindings_web"); - TEST_PROPS.setProperty(GOLDENFILE, "positiveXPathVariableBindingsTest.gf"); + // TEST_PROPS.setProperty(GOLDENFILE, "positiveXPathVariableBindingsTest.gf"); invoke(); } } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java similarity index 59% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java index e9283fdb5b..a7470dd368 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java @@ -14,56 +14,63 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xmlcore.parse; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_parse_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_parse_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_parse_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/xfiles/resolve.xml")), "xfiles/resolve.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.xml")), "import.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParseDocNullEmptyTest.jsp")), "negativeParseDocNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParseInvalidScopeTest.jsp")), "negativeParseInvalidScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParseScopeVarDomSyntaxTest.jsp")), "negativeParseScopeVarDomSyntaxTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeParseScopeVarSyntaxTest.jsp")), "negativeParseScopeVarSyntaxTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseFilterNullTest.jsp")), "positiveParseFilterNullTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseFilterTest.jsp")), "positiveParseFilterTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseNoDTDValidationTest.jsp")), "positiveParseNoDTDValidationTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseScopeDomTest.jsp")), "positiveParseScopeDomTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseScopeTest.jsp")), "positiveParseScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseSystemIdTest.jsp")), "positiveParseSystemIdTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseVarDomTest.jsp")), "positiveParseVarDomTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseVarTest.jsp")), "positiveParseVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseXmlAttrTest.jsp")), "positiveParseXmlAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseXmlBodyTest.jsp")), "positiveParseXmlBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveParseXmlInputTest.jsp")), "positiveParseXmlInputTest.jsp"); - setContextRoot("/jstl_xml_parse_web"); - setGoldenFileDir("/jstl/spec/xml/xmlcore/parse"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveParseXmlInputTest * @@ -75,7 +82,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * x:transform No validation will be performed against the result. The test * will be considered a success if no parse exceptions are thrown. */ + @Test public void positiveParseXmlInputTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseXmlInputTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseXmlInputTest"); invoke(); } @@ -91,7 +101,10 @@ public void positiveParseXmlInputTest() throws Exception { * attribute ('test') to the provided elements. XPath will be used to verify * that the attribute exists. */ + @Test public void positiveParseFilterTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseFilterTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseFilterTest"); invoke(); } @@ -105,7 +118,10 @@ public void positiveParseFilterTest() throws Exception { * is specified, the result is available via the PageContext and is of type * java.lang.Object. */ + @Test public void positiveParseVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseVarTest"); invoke(); } @@ -119,7 +135,10 @@ public void positiveParseVarTest() throws Exception { * varDom is specified, the result is available via the PageContext and is of * type org.w3c.dom.Document. */ + @Test public void positiveParseVarDomTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseVarDomTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseVarDomTest"); invoke(); } @@ -134,7 +153,10 @@ public void positiveParseVarDomTest() throws Exception { * var to the specified scope. If var is provided, but scope is not, verify * that var is exported to the page scope by default. */ + @Test public void positiveParseScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseScopeTest"); invoke(); } @@ -149,7 +171,10 @@ public void positiveParseScopeTest() throws Exception { * exports varDom to the specified scope. If varDom is provided, but scopeDom * is not, verify that varDom is exported to the page scope by default. */ + @Test public void positiveParseScopeDomTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseScopeDomTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseScopeDomTest"); invoke(); } @@ -163,7 +188,10 @@ public void positiveParseScopeDomTest() throws Exception { * as body content to the action. No exception should occur, and the result * should be available via an XPath expression. */ + @Test public void positiveParseXmlBodyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseXmlBodyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseXmlBodyTest"); invoke(); } @@ -176,7 +204,10 @@ public void positiveParseXmlBodyTest() throws Exception { * @testStrategy: Validate that if the 'filter' attribute is null, no * filtering takes place and the parse operation proceed normally. */ + @Test public void positiveParseFilterNullTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseFilterNullTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseFilterNullTest"); invoke(); } @@ -189,7 +220,10 @@ public void positiveParseFilterNullTest() throws Exception { * @testStrategy: Validate that when the SystemID attribute is used, it's able * to resolve external Entities referenced by the provided XML document. */ + @Test public void positiveParseSystemIdTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseSystemIdTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseSystemIdTest"); invoke(); } @@ -203,7 +237,10 @@ public void positiveParseSystemIdTest() throws Exception { * document provided with a DTD. Confirm by providing an XML document that * goes against the provided DTD. No parsing exception should occur. */ + @Test public void positiveParseNoDTDValidationTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseNoDTDValidationTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveParseNoDTDValidationTest"); invoke(); } @@ -216,6 +253,7 @@ public void positiveParseNoDTDValidationTest() throws Exception { * @testStrategy: Validate that if scope is specified, but var is not, that a * fatal translation error occurs. */ + @Test public void negativeParseScopeVarSyntaxTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeParseScopeVarSyntaxTest"); TEST_PROPS.setProperty(REQUEST, "negativeParseScopeVarSyntaxTest.jsp"); @@ -231,6 +269,7 @@ public void negativeParseScopeVarSyntaxTest() throws Exception { * @testStrategy: Validate that if scopeDom is specified, but varDom is not, * that a fatal translation error occurs. */ + @Test public void negativeParseScopeVarDomSyntaxTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeParseScopeVarDomSyntaxTest"); TEST_PROPS.setProperty(REQUEST, "negativeParseScopeVarSyntaxTest.jsp"); @@ -246,6 +285,7 @@ public void negativeParseScopeVarDomSyntaxTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the scope * attribute is provided an invalid value. */ + @Test public void negativeParseInvalidScopeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeParseInvalidScopeTest"); TEST_PROPS.setProperty(REQUEST, "negativeParseInvalidScopeTest.jsp"); @@ -261,7 +301,10 @@ public void negativeParseInvalidScopeTest() throws Exception { * @testStrategy: Validate that if doc is null or empty, that an instance of * jakarta.servlet.jsp.JspException is thrown. */ + @Test public void negativeParseDocNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeParseDocNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeParseDocNullEmptyTest"); invoke(); } @@ -274,7 +317,10 @@ public void negativeParseDocNullEmptyTest() throws Exception { * @test_Strategy: Validate that the xml attribute is still available for use * (deprecated and not removed). */ + @Test public void positiveParseXmlAttrTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveParseXmlAttrTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(REQUEST, "GET /jstl_xml_parse_web/positiveParseXmlAttrTest.jsp HTTP/1.1"); TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java similarity index 56% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java index 57deffebd1..851b7461d5 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java @@ -14,56 +14,52 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xmlcore.types; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + + - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_types_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_types_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_types_web.xml")); - setContextRoot("/jstl_xml_types_web"); - setGoldenFileDir("/jstl/spec/xml/xmlcore/types"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveJavaToXPathTypesTest.jsp")), "positiveJavaToXPathTypesTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXPathToJavaTypesTest.jsp")), "positiveXPathToJavaTypesTest.jsp"); - return super.run(args, out, err); + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } + /* * @testName: positiveJavaToXPathTypesTest * @@ -75,7 +71,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * java.lang.Boolean boolean java.lang.Number number java.lang.String string * Object exported by parse, set, or forEach node-set */ + @Test public void positiveJavaToXPathTypesTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveJavaToXPathTypesTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveJavaToXPathTypesTest"); invoke(); } @@ -91,7 +90,10 @@ public void positiveJavaToXPathTypesTest() throws Exception { * boolean java.lang.Boolean number java.lang.Number string java.lang.String * node-set Implementation specified (test will check for java.lang.Object) */ + @Test public void positiveXPathToJavaTypesTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveXPathToJavaTypesTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveXPathToJavaTypesTest"); invoke(); } diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java similarity index 57% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java index cdcd26b3b0..a08548b73e 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java @@ -14,56 +14,50 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xmlcore.xout; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xout_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xout_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xout_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeOutSelectFailureTest.jsp")), "negativeOutSelectFailureTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeOutSelectReqAttrTest.jsp")), "negativeOutSelectReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutEscXmlTest.jsp")), "positiveOutEscXmlTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveOutSelectTest.jsp")), "positiveOutSelectTest.jsp"); - setContextRoot("/jstl_xml_xout_web"); - setGoldenFileDir("/jstl/spec/xml/xmlcore/xout"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveOutSelectTest * @@ -72,7 +66,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate that the action properly displays the result of an * XPath expression provided to the select attribute. */ + @Test public void positiveOutSelectTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutSelectTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutSelectTest"); invoke(); } @@ -88,7 +85,10 @@ public void positiveOutSelectTest() throws Exception { * occur if the escapeXml is not present, or the value is true. Also validate * that no escaping occurs if the value is false. */ + @Test public void positiveOutEscXmlTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveOutEscXmlTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveOutEscXmlTest"); invoke(); } @@ -101,7 +101,10 @@ public void positiveOutEscXmlTest() throws Exception { * @testStrategy: Validate that a jakarta.servlet.jsp.JspException is thrown if * the expression language fails to evaluate the provided XPath expression. */ + @Test public void negativeOutSelectFailureTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeOutSelectFailureTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeOutSelectFailureTest"); invoke(); } @@ -114,6 +117,7 @@ public void negativeOutSelectFailureTest() throws Exception { * @testStrategy: Validate that a fatal translation error is generated if the * select attribute is not present in the out action. */ + @Test public void negativeOutSelectReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeOutSelectReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeOutSelectReqAttrTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java similarity index 61% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java index 76b62667fe..8670fa2a2b 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java @@ -14,56 +14,52 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xmlcore.xset; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xset_web"); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xset_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xset_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetInvalidScopeTest.jsp")), "negativeSetInvalidScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetSelectFailureTest.jsp")), "negativeSetSelectFailureTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetSelectReqAttrTest.jsp")), "negativeSetSelectReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSetVarReqAttrTest.jsp")), "negativeSetVarReqAttrTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetScopeTest.jsp")), "positiveSetScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetSelectVarTest.jsp")), "positiveSetSelectVarTest.jsp"); - setContextRoot("/jstl_xml_xset_web"); - setGoldenFileDir("/jstl/spec/xml/xmlcore/xset"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveSetSelectVarTest * @@ -74,7 +70,10 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * select is provided a valid XPath expression and the the variable reference * by var is available to another action. */ + @Test public void positiveSetSelectVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetSelectVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetSelectVarTest"); invoke(); } @@ -90,7 +89,10 @@ public void positiveSetSelectVarTest() throws Exception { * exports var to the specified scope. Also verify that if scope is not * specified, that var is exported to the page scope by default. */ + @Test public void positiveSetScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveSetScopeTest"); invoke(); } @@ -103,7 +105,10 @@ public void positiveSetScopeTest() throws Exception { * @testStrategy: Validate that if the XPath expression fails to evaluate an * instance of jakarta.servet.jsp.JspException is thrown. */ + @Test public void negativeSetSelectFailureTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeSetSelectFailureTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeSetSelectFailureTest"); invoke(); } @@ -116,6 +121,7 @@ public void negativeSetSelectFailureTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the var * attribute is not present. */ + @Test public void negativeSetVarReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeSetVarReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeSetVarReqAttrTest.jsp"); @@ -131,6 +137,7 @@ public void negativeSetVarReqAttrTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the select * attribute is not present. */ + @Test public void negativeSetSelectReqAttrTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeSetSelectReqAttrTest"); TEST_PROPS.setProperty(REQUEST, "negativeSetSelectReqAttrTest.jsp"); @@ -146,6 +153,7 @@ public void negativeSetSelectReqAttrTest() throws Exception { * @testStrategy: Validate that a fatal translation error occurs if the select * attribute is not present. */ + @Test public void negativeSetInvalidScopeTest() throws Exception { TEST_PROPS.setProperty(TEST_NAME, "negativeSetInvalidScopeTest"); TEST_PROPS.setProperty(REQUEST, "negativeSetInvalidScopeTest.jsp"); diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java similarity index 64% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java index 45a6eac956..ffc36c18a1 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java @@ -14,56 +14,49 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ -package com.sun.ts.tests.jstl.spec.xml.xtransform.param; -import java.io.PrintWriter; +package com.sun.ts.tests.jstl.spec.xml.xtransform.param; -import com.sun.javatest.Status; +import java.io.IOException; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { + + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot("/jstl_xml_xformparam_web"); } - /* - * public methods - * ======================================================================== - */ - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xformparam_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xformparam_web.xml")); - setContextRoot("/jstl_xml_xformparam_web"); - setGoldenFileDir("/jstl/spec/xml/xtransform/param"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/param.xsl")), "param.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXParamBodyValueTest.jsp")), "positiveXParamBodyValueTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXParamNameTest.jsp")), "positiveXParamNameTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveXParamValueTest.jsp")), "positiveXParamValueTest.jsp"); - return super.run(args, out, err); + archive.addAsLibrary(getCommonJarArchive()); + + return archive; } + /* * @testName: positiveXParamNameTest * @@ -72,6 +65,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * @testStrategy: Validate the name attribute of the x:param action is able to * accept both static and dynamic values. */ + @Test public void positiveXParamNameTest() throws Exception { // TEST_PROPS.setProperty(STANDARD, "positiveXParamNameTest"); TEST_PROPS.setProperty(REQUEST, @@ -89,6 +83,7 @@ public void positiveXParamNameTest() throws Exception { * @testStrategy: Validate the value attribute of the x:param action is able * to accept both static and dynamic values. */ + @Test public void positiveXParamValueTest() throws Exception { // TEST_PROPS.setProperty(STANDARD, "positiveXParamValueTest"); TEST_PROPS.setProperty(REQUEST, @@ -106,6 +101,7 @@ public void positiveXParamValueTest() throws Exception { * @testStrategy: Validate the value of the param can be provided as body * content to the action. */ + @Test public void positiveXParamBodyValueTest() throws Exception { // TEST_PROPS.setProperty(STANDARD, "positiveXParamBodyValueTest"); TEST_PROPS.setProperty(REQUEST, diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClient.java b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java similarity index 64% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClient.java rename to jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java index 1d2f4f63ba..f26a2fb344 100644 --- a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClient.java +++ b/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java @@ -14,58 +14,70 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * $URL$ $LastChangedDate$ - */ + package com.sun.ts.tests.jstl.spec.xml.xtransform.transform; -import java.io.PrintWriter; +import java.io.IOException; +import java.io.InputStream; -import com.sun.javatest.Status; import com.sun.ts.tests.jstl.common.client.AbstractUrlClient; -public class JSTLClient extends AbstractUrlClient { +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; - private static String CONTEXT_ROOT = "/jstl_xml_xform_web"; +@ExtendWith(ArquillianExtension.class) +public class JSTLClientIT extends AbstractUrlClient { - /* - * @class.setup_props: webServerHost; webServerPort; ts_home; - */ + public static String packagePath = JSTLClientIT.class.getPackageName().replace(".", "/"); + + private static String CONTEXT_ROOT = "/jstl_xml_xform_web"; /** Creates new JSTLClient */ - public JSTLClient() { + public JSTLClientIT() { + setContextRoot(CONTEXT_ROOT); } - /* - * public methods - * ======================================================================== - */ + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { - /** - * Entry point for different-VM execution. It should delegate to method - * run(String[], PrintWriter, PrintWriter), and this method should not contain - * any test configuration. - */ - public static void main(String[] args) { - JSTLClient theTests = new JSTLClient(); - Status s = theTests.run(args, new PrintWriter(System.out), - new PrintWriter(System.err)); - s.exit(); - } + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jstl_xml_xform_web.war"); + archive.setWebXML(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/jstl_xml_xform_web.xml")); - /** - * Entry point for same-VM execution. In different-VM execution, the main - * method delegates to this method. - */ - public Status run(String args[], PrintWriter out, PrintWriter err) { + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/xfiles/resolve.xml")), "xfiles/resolve.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/xfiles/resolve.xsl")), "xfiles/resolve.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.xml")), "import.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/import.xsl")), "import.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTransformXmlXsltNullEmptyTest.jsp")), "negativeTransformXmlXsltNullEmptyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/param.xsl")), "param.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformBodyParamsTest.jsp")), "positiveTransformBodyParamsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformBodyXmlParamsTest.jsp")), "positiveTransformBodyXmlParamsTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformDocSystemIdTest.jsp")), "positiveTransformDocSystemIdTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformResultTest.jsp")), "positiveTransformResultTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformScopeTest.jsp")), "positiveTransformScopeTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformVarTest.jsp")), "positiveTransformVarTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformXmlAndXmlSystemIdTest.jsp")), "positiveTransformXmlAndXmlSystemIdTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformXmlBodyTest.jsp")), "positiveTransformXmlBodyTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformXmlInputTest.jsp")), "positiveTransformXmlInputTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformXsltInputTest.jsp")), "positiveTransformXsltInputTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTransformXsltSystemIdTest.jsp")), "positiveTransformXsltSystemIdTest.jsp"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple.xml")), "simple.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple.xsl")), "simple.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple2.xml")), "simple2.xml"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple2.xsl")), "simple2.xsl"); + archive.add(new UrlAsset(JSTLClientIT.class.getClassLoader().getResource(packagePath+"/simple3.xsl")), "simple3.xsl"); - setContextRoot(CONTEXT_ROOT); - setGoldenFileDir("/jstl/spec/xml/xtransform/transform"); + archive.addAsLibrary(getCommonJarArchive()); - return super.run(args, out, err); + return archive; } + /* * @testName: positiveTransformXmlInputTest * @@ -77,6 +89,7 @@ public Status run(String args[], PrintWriter out, PrintWriter err) { * from the following sources: - String - Reader - javax.xml.transform.Source * - Objects exported by: + x:parse + x:set + x:transform */ + @Test public void positiveTransformXmlInputTest() throws Exception { String testName = "positiveTransformXmlInputTest"; TEST_PROPS.setProperty(REQUEST, @@ -102,6 +115,7 @@ public void positiveTransformXmlInputTest() throws Exception { * @testStrategy: Validate the transform action is able to accept XSL input * from the following sources: - String - Reader - javax.xml.transform.Source. */ + @Test public void positiveTransformXsltInputTest() throws Exception { String testName = "positiveTransformXsltInputTest"; TEST_PROPS.setProperty(REQUEST, @@ -125,6 +139,7 @@ public void positiveTransformXsltInputTest() throws Exception { * that the entities can be resolved when parsing both as as a String provided * to the xml attribute and as body content to the action. */ + @Test public void positiveTransformDocSystemIdTest() throws Exception { String testName = "positiveTransformDocSystemIdTest"; TEST_PROPS.setProperty(REQUEST, @@ -142,7 +157,10 @@ public void positiveTransformDocSystemIdTest() throws Exception { * @testStrategy: Validate the transform action is able to properly resolve * external references within a style sheet. */ + @Test public void positiveTransformXsltSystemIdTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTransformXsltSystemIdTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTransformXsltSystemIdTest"); invoke(); } @@ -156,7 +174,10 @@ public void positiveTransformXsltSystemIdTest() throws Exception { * reference by var is available in the PageContext and is of type * org.w3c.dom.Document. */ + @Test public void positiveTransformVarTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTransformVarTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTransformVarTest"); invoke(); } @@ -171,7 +192,10 @@ public void positiveTransformVarTest() throws Exception { * that var is exported to the specified scope. If var is specified and scope * is not, validate that var is exported to the page scope by default. */ + @Test public void positiveTransformScopeTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTransformScopeTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTransformScopeTest"); invoke(); } @@ -187,7 +211,10 @@ public void positiveTransformScopeTest() throws Exception { * transform action. The Result object is obtained from scope, and is then * manipulated to display the results of the transformation. */ + @Test public void positiveTransformResultTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveTransformResultTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "positiveTransformResultTest"); invoke(); } @@ -200,6 +227,7 @@ public void positiveTransformResultTest() throws Exception { * @testStrategy: Validate the transform action is able to parse and then * transform an XML document provided as body content to the action. */ + @Test public void positiveTransformXmlBodyTest() throws Exception { String testName = "positiveTransformXmlBodyTest"; TEST_PROPS.setProperty(REQUEST, @@ -216,6 +244,7 @@ public void positiveTransformXmlBodyTest() throws Exception { * @testStrategy: Validate that xsl parameters provided as x:param subtags to * the transform action are properly passed to the stylesheet. */ + @Test public void positiveTransformBodyParamsTest() throws Exception { // TEST_PROPS.setProperty(STANDARD, "positiveTransformBodyParamsTest"); String testName = "positiveTransformBodyParamsTest"; @@ -236,6 +265,7 @@ public void positiveTransformBodyParamsTest() throws Exception { * parsed and transform with the parameters properly supplied to the * stylesheet. */ + @Test public void positiveTransformBodyXmlParamsTest() throws Exception { // TEST_PROPS.setProperty(STANDARD, "positiveTransformBodyXmlParamsTest"); String testName = "positiveTransformBodyXmlParamsTest"; @@ -255,7 +285,10 @@ public void positiveTransformBodyXmlParamsTest() throws Exception { * @testStrategy: Validate that if either the xml or xslt attributes are null * or empty, that a JspException is thrown. */ + @Test public void negativeTransformXmlXsltNullEmptyTest() throws Exception { + InputStream gfStream = JSTLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeTransformXmlXsltNullEmptyTest.gf"); + setGoldenFileStream(gfStream); TEST_PROPS.setProperty(STANDARD, "negativeTransformXmlXsltNullEmptyTest"); invoke(); } @@ -268,6 +301,7 @@ public void negativeTransformXmlXsltNullEmptyTest() throws Exception { * @test_Strategy: Validate that the xml and xmlSystemId attributes can still * be used (deprecated and not removed). */ + @Test public void positiveTransformXmlAndXmlSystemIdTest() throws Exception { String testName = "positiveTransformXmlAndXmlSystemIdTest"; TEST_PROPS.setProperty(REQUEST, diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties new file mode 100644 index 0000000000..55ed342d80 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties @@ -0,0 +1,18 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# Sample ResourceBundle properties file +mkey=default message diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties new file mode 100644 index 0000000000..ef3089eb53 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties @@ -0,0 +1,18 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# Sample ResourceBundle properties file +mkey=en_IE_EURO message diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld new file mode 100644 index 0000000000..6065caaa03 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld @@ -0,0 +1,243 @@ + + + + + + + + Utility tag library for JSTL TCK tests + JSTLTCK-Util + 1.0 + JSTLTCK-Util + http://java.sun.com/jstltck/jstltck-util + + + + + A simple tag to write HTML 'headers' and 'footers' + TestTag + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + + testName + false + + + + + + + + + ExceptionCheckTag allows the checking of an exception thrown by a nested tag + catch + catch + com.sun.ts.tests.jstl.common.tags.ExceptionCheckTag + JSP + + exception + true + + + rootException + false + + + var + true + + + exceptionText + false + true + + + checkRootCause + false + + + + + + + + + + Validates the specified type against the specified scoped variable. + + isInstance + isInstance + com.sun.ts.tests.jstl.common.tags.TypeCheckTag + empty + + type + true + + + varName + true + + + + + + + + + Simple tag whose only purpose is to throw a JspException + ThrowTag + throwit + com.sun.ts.tests.jstl.common.tags.ThrowTag + empty + + + + + + + + Simple tag to check the PageContext for an attribute in a specified scope + CheckVarTag + checkScope + com.sun.ts.tests.jstl.common.tags.ScopeCheckTag + empty + + varName + true + + + inScope + false + + + useConfig + false + + + + + + + + + A simple tag to check the version of Java runtime + CheckRuntimeTag + checkRuntime + com.sun.ts.tests.jstl.common.tags.CheckRuntime + empty + + var + true + + + + + + + + + + Simple tag to display types for iteration tests when using multiple collection types + DisplayTypeTag + displayType + com.sun.ts.tests.jstl.common.tags.DisplayTypeTag + empty + + varName + true + + + + + + + + + Simple tag to generate an absolute URL for the server where the tag is running. + LocalAbsUrlTag + localAbsUrl + com.sun.ts.tests.jstl.common.tags.GetLocalUrlTag + empty + + var + true + + + path + true + + + + + + + + + Simple tag to interact with JSTL core Config class + ConfigTag + config + com.sun.ts.tests.jstl.common.tags.ConfigTag + empty + + var + false + + + scope + false + + + configVar + true + + + value + false + true + + + op + true + + + + + + + Testing c:forEach, c:forTokens, c:set with deferred expressions + + save + com.sun.ts.tests.jstl.common.tags.SaveTag + empty + + attr + true + + java.lang.String + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld new file mode 100644 index 0000000000..c0fdcede2b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld @@ -0,0 +1,65 @@ + + + + + + + + 1.0 + 1.2 + JSTLTCK-Util + http://java.sun.com/jstltck/permitted + JSTLTCK-Util + Utility tag library for JSTL TCK tests + + + + + jakarta.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + permittedTaglibs + + http://java.sun.com/jstltck/jstltck-util + + + + + + + + + + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + TestTag + A simple tag to write HTML 'headers' and 'footers' + + testName + false + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld new file mode 100644 index 0000000000..c85fdb9f81 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld @@ -0,0 +1,75 @@ + + + + + + + + 1.0 + 1.2 + JSTLTCK-Util + http://java.sun.com/jstltck/nodecl + JSTLTCK-Util + Utility tag library for JSTL TCK tests + + + + + jakarta.servlet.jsp.jstl.tlv.ScriptFreeTLV + + allowDeclarations + false + + + allowScriptlets + true + + + allowExpressions + true + + + allowRTExpressions + true + + + + + + + + + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + TestTag + A simple tag to write HTML 'headers' and 'footers' + + testName + false + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld new file mode 100644 index 0000000000..d8945f466d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld @@ -0,0 +1,75 @@ + + + + + + + + 1.0 + 1.2 + JSTLTCK-Util + http://java.sun.com/jstltck/noexpr + JSTLTCK-Util + Utility tag library for JSTL TCK tests + + + + + jakarta.servlet.jsp.jstl.tlv.ScriptFreeTLV + + allowDeclarations + true + + + allowScriptlets + true + + + allowExpressions + false + + + allowRTExpressions + true + + + + + + + + + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + TestTag + A simple tag to write HTML 'headers' and 'footers' + + testName + false + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld new file mode 100644 index 0000000000..9449366481 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld @@ -0,0 +1,75 @@ + + + + + + + + 1.0 + 1.2 + JSTLTCK-Util + http://java.sun.com/jstltck/nortexpr + JSTLTCK-Util + Utility tag library for JSTL TCK tests + + + + + jakarta.servlet.jsp.jstl.tlv.ScriptFreeTLV + + allowDeclarations + true + + + allowScriptlets + true + + + allowExpressions + true + + + allowRTExpressions + false + + + + + + + + + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + TestTag + A simple tag to write HTML 'headers' and 'footers' + + testName + false + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld new file mode 100644 index 0000000000..1492748f24 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld @@ -0,0 +1,77 @@ + + + + + + + + + + 1.0 + 1.2 + JSTLTCK-Util + http://java.sun.com/jstltck/noscr + JSTLTCK-Util + Utility tag library for JSTL TCK tests + + + + + jakarta.servlet.jsp.jstl.tlv.ScriptFreeTLV + + allowDeclarations + true + + + allowScriptlets + false + + + allowExpressions + true + + + allowRTExpressions + true + + + + + + + + + test + com.sun.ts.tests.jstl.common.tags.TestTag + JSP + TestTag + A simple tag to write HTML 'headers' and 'footers' + + testName + false + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar new file mode 100644 index 0000000000..c23af93fde Binary files /dev/null and b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar differ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar new file mode 100644 index 0000000000..ba25fff3db Binary files /dev/null and b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar differ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp new file mode 100644 index 0000000000..38adcbae49 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@page contentType="text/html"%> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt new file mode 100644 index 0000000000..3f60cf5872 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt @@ -0,0 +1,2 @@ +Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml new file mode 100644 index 0000000000..941075b4f1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml @@ -0,0 +1,45 @@ + + + + + + + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp new file mode 100644 index 0000000000..13114dcfb0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/nodecl" %> + + + <%! String test = "Shouldn't have translated"; %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl new file mode 100644 index 0000000000..890604583d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl @@ -0,0 +1,27 @@ + + + + + DEFAULT + 8pt + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf new file mode 100644 index 0000000000..90464b4451 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf @@ -0,0 +1,31 @@ + + + + + + +positiveBundleLocalizationScopeTest + + + + + Should be 'en message': en message
+ + Should be ???mkey???: ???mkey???
+ + + + Should be 'en message': en message
+ + Should be ???mkey???: ???mkey???
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp new file mode 100644 index 0000000000..811a32150b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Should be 'en message':
+
+ Should be ???mkey???:
+ + + + Should be 'en message':
+
+ Should be ???mkey???:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf new file mode 100644 index 0000000000..8f8f498d95 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf @@ -0,0 +1,71 @@ + + + + + + +positiveCWOTest + + + + + + + + PASSED
+ + + + + + + + PASSED
+ + + + + + + + + + PASSED
+ + + + + + + + PASSED
+ + + + + + + + PASSED
+ + + + + + + + + + PASSED
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp new file mode 100644 index 0000000000..78fab50d53 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp @@ -0,0 +1,98 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <%-- Test EL CWO support --%> + <% + pageContext.setAttribute("elTrue", new Boolean("true")); + pageContext.setAttribute("elFalse", new Boolean("false")); + %> + + + + PASSED
+
+
+ + + + + FAILED
+
+ + PASSED
+
+ + FAILED
+
+
+ + + + + FAILED
+
+ + FAILED
+
+ + PASSED
+
+
+ + <%-- Validate RT CWO support --%> + + + + PASSED
+
+
+ + + + + FAILED
+
+ + PASSED
+
+ + FAILED
+
+
+ + + + + FAILED
+
+ + FAILED
+
+ + PASSED
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf new file mode 100644 index 0000000000..96f2f5ad8a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf @@ -0,0 +1,25 @@ + + + + + + +positiveCatchVarTest + + + + + + ex is of type java.lang.IllegalArgumentException
+ + + + + ex is of type java.lang.IllegalArgumentException
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp new file mode 100644 index 0000000000..5b11e064d5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf new file mode 100644 index 0000000000..17b3083eac --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf @@ -0,0 +1,66 @@ + + + + + + + + + +positiveDateParamQueryTimestampTest + + + + + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp using EL

+

+ + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp using RT

+

+ + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp new file mode 100644 index 0000000000..514db394de --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp @@ -0,0 +1,112 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("theDate", new Date( 101,7,30,20,20,20)); + %> + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp using EL

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp using RT

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf new file mode 100644 index 0000000000..f552ea187c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf @@ -0,0 +1,27 @@ + + + + + + + +positiveDefaultEncodingTest + + + + + + iso-8859-1 + + + + + iso-8859-1 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp new file mode 100644 index 0000000000..0c7efe5ccb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + <%= request.getCharacterEncoding().toLowerCase() %> + + + + <%= request.getCharacterEncoding().toLowerCase() %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf new file mode 100644 index 0000000000..607cbfd06d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf @@ -0,0 +1,26 @@ + + + + + + + + +positiveFDValueTest + + + + + + + Dec 26, 1997
+ + + Dec 26, 1997
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp new file mode 100644 index 0000000000..7767d69f6e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + +
+ + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf new file mode 100644 index 0000000000..e6cfbd811e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf @@ -0,0 +1,53 @@ + + + + + + + +positiveFNScopeTest + + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp new file mode 100644 index 0000000000..5e2245ef4e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp @@ -0,0 +1,52 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf new file mode 100644 index 0000000000..37beece467 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf @@ -0,0 +1,44 @@ + + + + + + + +positiveVarForEachTest + + + + + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + iter is of type java.lang.Object
+ btext1
+ + iter is of type java.lang.Object
+ btext2
+ + iter correctly removed after action completed +

+ + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + iter is of type java.lang.Object
+ btext1
+ + iter is of type java.lang.Object
+ btext2
+ + iter correctly removed after action completed + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp new file mode 100644 index 0000000000..fb7eb37611 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + + + + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + +
+
+ +

+ + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + +
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf new file mode 100644 index 0000000000..9552b6d9d4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf @@ -0,0 +1,51 @@ + + + + +positiveForTokensTest + + + + + + a
+ + b
+ + c
+ + $d
+ + + + 1
+ + 2
+ + 3
+ + + + + a
+ + b
+ + c
+ + $d
+ + + + a
+ + b
+ + c
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp new file mode 100644 index 0000000000..6aa1577891 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String complexString = "a###b c# $d"; + String complexDelim = "# "; + pageContext.setAttribute("complexStr", complexString); + pageContext.setAttribute("complexDel", complexDelim); + %> + + +
+
+ + +
+
+ + + +
+
+ + +
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf new file mode 100644 index 0000000000..7596ccb91d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf @@ -0,0 +1,36 @@ + + + + + + + + +positiveFormatLocalizationContextI18NTest + + + + + + + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp new file mode 100644 index 0000000000..d441864eb6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp @@ -0,0 +1,48 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf new file mode 100644 index 0000000000..b555e105b0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf @@ -0,0 +1,52 @@ + + + + + + +positiveIfScopeTest + + + + + + + + + + eVar0 found in page scope.
+ + eVar1 found in page scope.
+ + eVar2 found in request scope.
+ + eVar3 found in session scope.
+ + eVar4 found in application scope.
+ + + + + + + + + + + rVar0 found in page scope.
+ + rVar1 found in page scope.
+ + rVar2 found in request scope.
+ + rVar3 found in session scope.
+ + rVar4 found in application scope.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp new file mode 100644 index 0000000000..1c8747c456 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <%-- check scope behavior of EL tags --%> + <% + pageContext.setAttribute("bTrue", new Boolean("true")); + %> + + + + + + + + + + + + + + <%-- check scope behavior of RT tags --%> + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf new file mode 100644 index 0000000000..443bea520e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf @@ -0,0 +1,23 @@ + + + + + + +positiveImportAbsUrlTest + + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp new file mode 100644 index 0000000000..97aeade2d3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf new file mode 100644 index 0000000000..cace0e81a1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf @@ -0,0 +1,151 @@ + + + + + + + +positiveItemsObjArrayTest + + + + + + + eInner is of type:java.lang.Byte
+ 97
+ + eInner is of type:java.lang.Byte
+ 98
+ + + + eInner is of type:java.lang.Boolean
+ true
+ + eInner is of type:java.lang.Boolean
+ false
+ + + + eInner is of type:java.lang.Character
+ a
+ + eInner is of type:java.lang.Character
+ b
+ + + + eInner is of type:java.lang.Short
+ 1
+ + eInner is of type:java.lang.Short
+ 2
+ + + + eInner is of type:java.lang.Integer
+ 1
+ + eInner is of type:java.lang.Integer
+ 2
+ + + + eInner is of type:java.lang.Long
+ 1
+ + eInner is of type:java.lang.Long
+ 2
+ + + + eInner is of type:java.lang.Float
+ 1.0
+ + eInner is of type:java.lang.Float
+ 2.0
+ + + + eInner is of type:java.lang.Double
+ 1.0
+ + eInner is of type:java.lang.Double
+ 1.0
+ + + + + + + rInner is of type:java.lang.Byte
+ 97
+ + rInner is of type:java.lang.Byte
+ 98
+ + + + rInner is of type:java.lang.Boolean
+ true
+ + rInner is of type:java.lang.Boolean
+ false
+ + + + rInner is of type:java.lang.Character
+ a
+ + rInner is of type:java.lang.Character
+ b
+ + + + rInner is of type:java.lang.Short
+ 1
+ + rInner is of type:java.lang.Short
+ 2
+ + + + rInner is of type:java.lang.Integer
+ 1
+ + rInner is of type:java.lang.Integer
+ 2
+ + + + rInner is of type:java.lang.Long
+ 1
+ + rInner is of type:java.lang.Long
+ 2
+ + + + rInner is of type:java.lang.Float
+ 1.0
+ + rInner is of type:java.lang.Float
+ 2.0
+ + + + rInner is of type:java.lang.Double
+ 1.0
+ + rInner is of type:java.lang.Double
+ 1.0
+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp new file mode 100644 index 0000000000..9be7a1da50 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.ArrayList" %> + + <% + Byte[] bArray = { new Byte((byte) 'a'), new Byte((byte) 'b') }; + Boolean[] boolArray = { new Boolean(true), new Boolean(false) }; + Character[] cArray = { new Character('a'), new Character('b') }; + Short[] sArray = { new Short((short) 1), new Short((short) 2) }; + Integer[] iArray = { new Integer(1), new Integer(2) }; + Long[] lArray = { new Long(1L), new Long(2L) }; + Float[] fArray = { new Float(1.0f), new Float(2.0f) }; + Double[] dArray = { new Double(1.0d), new Double(1.0d) }; + Object[] holder = { bArray, boolArray, cArray, sArray, iArray, lArray, + fArray, dArray }; + pageContext.setAttribute("holderVar", holder); + %> + + + +
+
+
+
+ + + + +
+
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp new file mode 100644 index 0000000000..0026ff79a6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveJSTLURITest + + +<%-- EL Tags --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> + +<%-- RT Tags --%> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf new file mode 100644 index 0000000000..7f36463914 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf @@ -0,0 +1,26 @@ + + + + + + + +positiveMessageKeyTest + + + + + + + en message + en message + + + en message + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp new file mode 100644 index 0000000000..90f58dd3ba --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf new file mode 100644 index 0000000000..38a8b0bb4a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf @@ -0,0 +1,53 @@ + + + + + + + +positiveOutEscXmlTest + + + + + escapeXml == true: + < > & ' " +
+ escapeXml == false: + < > & ' " +
+ escapeXml == not specified: + < > & ' " +
+ + + escapeXml == true: + < > & ' " + + escapeXml == false: + < > & ' " +
+ escapeXml == not specified: + < > & ' " +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp new file mode 100644 index 0000000000..9b7b62f751 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + & ' "]]> + + + + escapeXml == true:
+ escapeXml == false:
+ escapeXml == not specified:
+ + + escapeXml == true: + escapeXml == false:
+ escapeXml == not specified:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf new file mode 100644 index 0000000000..8a41bd9953 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf @@ -0,0 +1,31 @@ + + + + + + + +positivePDValueTest + + + + + + + + + Nov 21, 2000
+ Nov 21, 2000
+ + + + + Nov 21, 2000 + Nov 21, 2000 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp new file mode 100644 index 0000000000..5230a3bd57 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + +
+
+ + + + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf new file mode 100644 index 0000000000..067fd4177c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf @@ -0,0 +1,28 @@ + + + + + + + +positivePNValueTest + + + + + + 1234 + 1234 + + + 1234 + 1234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp new file mode 100644 index 0000000000..baeb7cab7c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf new file mode 100644 index 0000000000..77573d647a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf @@ -0,0 +1,43 @@ + + + + +positiveParamNameValueTest + + + + + + + + + + + + testparm found! Value is: parmvalue + + + testparm2 found! Value is: parmvalue2 + + + + + + + + + + + + testparm found! Value is: parmvalue + + + testparm2 found! Value is: parmvalue2 + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp new file mode 100644 index 0000000000..6602a3c692 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf new file mode 100644 index 0000000000..56d3e71b44 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveParamValueTest + + + + + + param1: value1, param2: value2 + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp new file mode 100644 index 0000000000..3a37f1b645 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf new file mode 100644 index 0000000000..7a24c0b185 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf @@ -0,0 +1,28 @@ + + + + + + + +positiveParseVarTest + + + + + Exported var: doc1 is of type java.lang.Object
+ + + + Exported var: rdoc1 is of type java.lang.Object
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp new file mode 100644 index 0000000000..edb6ae1139 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Exported var: + + + + Exported var: + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp new file mode 100644 index 0000000000..7b220cf37c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/permitted" %> + + + Test PASSED
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf new file mode 100644 index 0000000000..45a3ce3819 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf @@ -0,0 +1,73 @@ + + + + + + + + + +positiveQueryScopeAttributeTest + + + + + + +

Validating sql:query action scope attributes using EL

+

+ + + iPage found in page scope.
+ + + + ePage found in page scope.
+ + + + eSession found in session scope.
+ + + + eRequest found in request scope.
+ + + + eApplication found in application scope.
+ + + + + +

Validating sql:query action scope attributes using RT

+

+ + + riPage found in page scope.
+ + + + rePage found in page scope.
+ + + + reSession found in session scope.
+ + + + reRequest found in request scope.
+ + + + + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp new file mode 100644 index 0000000000..06c9949680 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp @@ -0,0 +1,102 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validating sql:query action scope attributes using EL

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Validating sql:query action scope attributes using RT

+

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp new file mode 100644 index 0000000000..aa3631be19 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp @@ -0,0 +1,74 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page session="false" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf new file mode 100644 index 0000000000..03af45d8ab --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf @@ -0,0 +1,62 @@ + + + + + + +positiveRemoveScopeTest + + + + + + + + + + + + + + rea not found in specified scope:session.
+ + ePage not found in specified scope:page.
+ + eRequest not found in specified scope:request.
+ + eSession not found in specified scope:session.
+ + eApplication not found in specified scope:application.
+ + + + + + + + + + + + + + + reaa not found in specified scope:application.
+ + rePage not found in specified scope:page.
+ + reRequest not found in specified scope:request.
+ + reSession not found in specified scope:session.
+ + reApplication not found in specified scope:application.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp new file mode 100644 index 0000000000..1a8bc56e5a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp @@ -0,0 +1,61 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf new file mode 100644 index 0000000000..5983d671f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf @@ -0,0 +1,60 @@ + + + + + + + + + +positiveResultGetRowsCountTest + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned using EL

+

+ + + + + + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned using RT

+

+ + + + + + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp new file mode 100644 index 0000000000..cf15207af5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp @@ -0,0 +1,95 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned using EL

+

+ + + + + <% + SortedMap [] rows = (SortedMap[]) pageContext.getAttribute("rows"); + pageContext.setAttribute("rowsReturned", new Integer(rows.length)); + %> + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + +

Error

The Expected number of rows was not returned from + Result.getRows. The expected number of columns was + , + the returned number of rows was + using the query + . +

+ + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned using RT

+

+ + + + + <% + rows = (SortedMap[]) pageContext.getAttribute("rows2"); + pageContext.setAttribute("rowsReturned2", new Integer(rows.length)); + %> + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + +

Error

The Expected number of rows was not returned from + Result.getRows. The expected number of columns was + , + the returned number of rows was + using the query + . +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf new file mode 100644 index 0000000000..8243a6f7f0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf @@ -0,0 +1,53 @@ + + + + + + + +positiveSetBundleScopeVarTest + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp new file mode 100644 index 0000000000..3181a9e2e3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf new file mode 100644 index 0000000000..2e836c541f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf @@ -0,0 +1,70 @@ + + + + + + + + + +positiveSetDataSourceScopeAttributeTest + + + + + + +

Validating sql:setDataSource action scope attributes using EL

+

+ + + iPage found in page scope.
+ + + + ePage found in page scope.
+ + + + eSession found in session scope.
+ + + + eRequest found in request scope.
+ + + + eApplication found in application scope.
+ + + + +

Validating sql:setDataSource action scope attributes using RT

+

+ + + riPage found in page scope.
+ + + + rePage found in page scope.
+ + + + reSession found in session scope.
+ + + + reRequest found in request scope.
+ + + + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp new file mode 100644 index 0000000000..7ab1fd5c13 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp @@ -0,0 +1,80 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validating sql:setDataSource action scope attributes using EL

+

+ + + + + + + + + + + + + + + + + + +

Validating sql:setDataSource action scope attributes using RT

+

+ + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf new file mode 100644 index 0000000000..4c73a2d6a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf @@ -0,0 +1,43 @@ + + + + + + + + +positiveSetLocaleValueTest + + + + + + + + fr_CA
+ + + + en_GB
+ + + + en_US
+ + + + + fr_CA
+ + + + en_GB
+ + + + en_US
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp new file mode 100644 index 0000000000..1dd011696e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + Locale loc = new Locale("en", "GB"); + pageContext.setAttribute("gbloc", loc); + %> + + + + +
+ + + +
+ + + +
+ + + + +
+ + + +
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf new file mode 100644 index 0000000000..c6933a7499 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf @@ -0,0 +1,56 @@ + + + + + + +positiveSetScopeTest + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp new file mode 100644 index 0000000000..be78457dc7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf new file mode 100644 index 0000000000..144eb757ea --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf @@ -0,0 +1,28 @@ + + + + + + + +positiveSetSelectVarTest + + + + + + xResult should evaluated to 'text': text
+ + + + xResult should evaluated to 'text': text
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp new file mode 100644 index 0000000000..2b159c76c6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + + + + xResult should evaluated to 'text':
+ + + + xResult should evaluated to 'text':
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf new file mode 100644 index 0000000000..458ae4af14 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf @@ -0,0 +1,41 @@ + + + + + + + + +positiveTimezoneValueTest + + + + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Saturday, December 27, 1997 at 2:11:34 AM GMT-01:00 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp new file mode 100644 index 0000000000..c6c1c116b1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.TimeZone,java.util.Date" %> + + <% + TimeZone tz = TimeZone.getTimeZone("PST"); + pageContext.setAttribute("tz", tz); + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf new file mode 100644 index 0000000000..12a4ccf123 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf @@ -0,0 +1,43 @@ + + + + + + + + +positiveTimezoneValueTest + + + + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Saturday, December 27, 1997 at 2:11:34 AM GMT-01:00 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp new file mode 100644 index 0000000000..9a00a95c88 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp @@ -0,0 +1,57 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> +<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.TimeZone,java.util.Date" %> + + <% + TimeZone tz = TimeZone.getTimeZone("PST"); + pageContext.setAttribute("tz", tz); + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf new file mode 100644 index 0000000000..4b5af3f739 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf @@ -0,0 +1,28 @@ + + + + + + + +positiveTransformVarTest + + + + + + + trans1 is of type org.w3c.dom.Document
+ + + + trans2 is of type org.w3c.dom.Document
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp new file mode 100644 index 0000000000..e5054baf05 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf new file mode 100644 index 0000000000..60c606df35 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf @@ -0,0 +1,58 @@ + + + + + + + + + +positiveTxQueryCommitTest + + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully using EL

+

+ + + + + + + + + The query did return a Result Object that contained + 10 rows. +

+ + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully using RT

+

+ + + + + + + + + The query did return a Result Object that contained + 10 rows. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp new file mode 100644 index 0000000000..ce5e6e261d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp @@ -0,0 +1,86 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully using EL

+

+ + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + rows. +

+ + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully using RT

+

+ + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + rows. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf new file mode 100644 index 0000000000..29196d274a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf @@ -0,0 +1,50 @@ + + + + + + + + + +positiveUpdateBodyContentTest + + + + + + +

Validate sql:update action supports a SQL statement as body content using EL

+ + + + + + The correct update count was received for the + query.

+ + + + + + + +

Validate sql:update action supports a SQL statement as body content using RT

+ + + + + + + The correct update count was received for the + query.

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp new file mode 100644 index 0000000000..5ce22fde13 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp @@ -0,0 +1,77 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*" %> + + + + + + +

Validate sql:update action supports a SQL statement as body content using EL

+ + + + + + + + The correct update count was received for the + query.

+ + +

Error:

The query " + + " resulted in an update count of + and the + the expected update count was 0!

+ + + + + + +

Validate sql:update action supports a SQL statement as body content using RT

+ + + + + + + + + The correct update count was received for the + query.

+ + +

Error:

The query " + + " resulted in an update count of + and the + the expected update count was 0!

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf new file mode 100644 index 0000000000..d5bc602549 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf @@ -0,0 +1,51 @@ + + + + + + +positiveUrlScopeTest + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp new file mode 100644 index 0000000000..e4abee6f64 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp new file mode 100644 index 0000000000..27be0eac57 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + REPLACE + + + + +
+ + + + + REPLACE + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml new file mode 100644 index 0000000000..39f1127054 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml @@ -0,0 +1,20 @@ + + + +transform one text diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl new file mode 100644 index 0000000000..419bdaaf3c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml rename to jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp new file mode 100644 index 0000000000..dda9cbebdb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf new file mode 100644 index 0000000000..0854a0c091 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf @@ -0,0 +1,23 @@ + + + + + + +negativeCWOOtherwiseExcBodyContentTest + + + + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp new file mode 100644 index 0000000000..311f17116c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + Test FAILED
+
+ + + +
+
+ + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp new file mode 100644 index 0000000000..99163bee4b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + <%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Body content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp new file mode 100644 index 0000000000..e491acd987 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body improperly processed.
+
+ + Body content improperly processed.
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf new file mode 100644 index 0000000000..9ba0990dd9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf @@ -0,0 +1,22 @@ + + + + + + +negativeCWOWhenExcBodyContentTest + + + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp new file mode 100644 index 0000000000..3551e9e8b6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp new file mode 100644 index 0000000000..c29646f6f6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Body content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp new file mode 100644 index 0000000000..c421cf5716 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body content improperly processed.
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf new file mode 100644 index 0000000000..275df7a9d7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf @@ -0,0 +1,19 @@ + + + + + +negativeCWOWhenTypeTest + + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp new file mode 100644 index 0000000000..755f1e8d1e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("invalidValue", new Integer("12")); + %> + + + + FAILED
+
+
+
+ <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf new file mode 100644 index 0000000000..3f6e8086a0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf @@ -0,0 +1,39 @@ + + + + + +positiveCWOTest + + + + + + + PASSED
+ + + + + + + + PASSED
+ + + + + + + + + + PASSED
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp new file mode 100644 index 0000000000..93b471118c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp @@ -0,0 +1,57 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + PASSED
+
+
+ + + + + FAILED
+
+ + PASSED
+
+ + FAILED
+
+
+ + + + + FAILED
+
+ + FAILED
+
+ + PASSED
+
+
+
diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml rename to jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf new file mode 100644 index 0000000000..fde46f9e6b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf @@ -0,0 +1,18 @@ + + + + + + +negativeIfExcBodyContentTest + + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp new file mode 100644 index 0000000000..de55bb54e7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf new file mode 100644 index 0000000000..5da25c043f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf @@ -0,0 +1,17 @@ + + + + + +negativeTypeTestAttrTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp new file mode 100644 index 0000000000..86008cc3d3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("fail", new Integer("12")); + %> + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf new file mode 100644 index 0000000000..f88c192fbb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf @@ -0,0 +1,28 @@ + + + + + + +positiveIfBodyBehaviorTest + + + + + + + PASSED
+ + + + + + PASSED
+ + + true
+ false
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp new file mode 100644 index 0000000000..590a1ca2c7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + <% + pageContext.setAttribute("bTrue", new Boolean("true")); + pageContext.setAttribute("bFalse", new Boolean("false")); + %> + <%-- body content with no var attribute --%> + + PASSED
+
+ + FAILED
+
+ + <%-- body content with the var attribute --%> + + PASSED
+
+ + FAILED
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf new file mode 100644 index 0000000000..d43e711daf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf @@ -0,0 +1,16 @@ + + + + + + +positiveExportedVarTypeTest + + + + + var0 is of type java.lang.Boolean
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp new file mode 100644 index 0000000000..bec6110647 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <%-- check type of var exported tag --%> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf new file mode 100644 index 0000000000..261b306e64 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf @@ -0,0 +1,32 @@ + + + + + + +positiveIfScopeTest + + + + + + + + + + rVar0 found in page scope.
+ + rVar1 found in page scope.
+ + rVar2 found in request scope.
+ + rVar3 found in session scope.
+ + rVar4 found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp new file mode 100644 index 0000000000..5e60c98cd8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + <%-- check scope behavior of tags --%> + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf new file mode 100644 index 0000000000..ada4f78ab1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf @@ -0,0 +1,35 @@ + + + + + + +positiveIfTest + + + + + + + + + true
+ false
+ true
+ false
+ + + + + true
+ false
+ + + + + true
+ false
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp new file mode 100644 index 0000000000..2ac693f77b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("bTrue", new Boolean("true")); + pageContext.setAttribute("bFalse", new Boolean("false")); + pageContext.setAttribute("iOne", new Integer("1")); + %> + + + + + +
+
+
+
+ + + + +
+
+ + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml new file mode 100644 index 0000000000..ecc20387b0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_gen_catch_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf new file mode 100644 index 0000000000..2d055a44c2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveCatchTest + + + + + Exception caught
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp new file mode 100644 index 0000000000..04f46dc2cf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf new file mode 100644 index 0000000000..cbeec44800 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveCatchVarTest + + + + + ex is of type java.lang.IllegalArgumentException
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp new file mode 100644 index 0000000000..791d24b8f9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml new file mode 100644 index 0000000000..ecc20387b0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_gen_catch_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf new file mode 100644 index 0000000000..33173ea022 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeOutBodyContentExcTest + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp new file mode 100644 index 0000000000..6036c62dee --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf new file mode 100644 index 0000000000..2f70c92e8c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveOutBodyBehaviorTest + + + + Default body
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp new file mode 100644 index 0000000000..21f50b10e3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Default body
+
+ + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf new file mode 100644 index 0000000000..46892f9c56 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveOutDefaultAttributeTest + + + + Dynamic default value
+ static default value
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp new file mode 100644 index 0000000000..026175cb3b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("defaultVal", "Dynamic default value"); + %> + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf new file mode 100644 index 0000000000..35359f7cc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf @@ -0,0 +1,17 @@ + + + + + + +positiveOutEscXmlDefaultTest + + + + XML entities should be escaped: < > ' " &
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp new file mode 100644 index 0000000000..050aa50e7e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + XML entities should be escaped:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf new file mode 100644 index 0000000000..de8b19b454 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveOutEscXmlTest + + + + escapeXml true: < > ' " &
+ escapeXml false: < > ' " &
+ escapeXml true: < > ' " &
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp new file mode 100644 index 0000000000..f1b8266f56 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + escapeXml true:
+ escapeXml false:
+ escapeXml true:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp new file mode 100644 index 0000000000..44af4d0ea6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.io.StringReader"%> +<%@ taglib uri="jakarta.tags.core" prefix="c" %> + +<% + StringReader reader = new StringReader("Test PASSED"); + pageContext.setAttribute("reader", reader); +%> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf new file mode 100644 index 0000000000..458ea3894a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf @@ -0,0 +1,16 @@ + + + + + +positiveOutValueAttributeTest + + + + pageObj
+ static
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp new file mode 100644 index 0000000000..027ce3c944 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("pageObj", "pageObj"); + %> +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml new file mode 100644 index 0000000000..2734315236 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_gen_rem_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf new file mode 100644 index 0000000000..f4cde08c2e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf @@ -0,0 +1,37 @@ + + + + + + +positiveRemoveScopeTest + + + + + + + + + + + + + + reaa not found in specified scope:application.
+ + rePage not found in specified scope:page.
+ + reRequest not found in specified scope:request.
+ + reSession not found in specified scope:session.
+ + reApplication not found in specified scope:application.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp new file mode 100644 index 0000000000..421c698ba7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml new file mode 100644 index 0000000000..23ebf8a1e8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml @@ -0,0 +1,23 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_gen_set_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf new file mode 100644 index 0000000000..e487d994fc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeSetBodyContentExcTest + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp new file mode 100644 index 0000000000..908e428ef6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf new file mode 100644 index 0000000000..eb92a62cf0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf @@ -0,0 +1,26 @@ + + + + + + +negativeSetTargetNullInvalidObjTest + + + + Target is null:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + Target is not a Map or Bean:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp new file mode 100644 index 0000000000..956013b8bf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("invalid", new Integer(1)); + %> + + Target is null:
+ + + + + + Target is not a Map or Bean:
+ + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf new file mode 100644 index 0000000000..968949a6b3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf @@ -0,0 +1,21 @@ + + + + + + +positiveSetBodyBehaviorTest + + + + + body value
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp new file mode 100644 index 0000000000..4ea516579f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + body value + +
+ + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf new file mode 100644 index 0000000000..954018d971 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf @@ -0,0 +1,17 @@ + + + + + + +positiveSetDeferredValueTest + + + 0 + this is a deferred value +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp new file mode 100644 index 0000000000..8ffde59a37 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + +<%@ page import="java.util.ArrayList" %> +<%@ page import="jakarta.el.ValueExpression" %> + +<% String str = "this is a deferred value"; + pageContext.setAttribute("foo", str); +%> + + + + + + <% + ArrayList al = (ArrayList) pageContext.getAttribute("alist", PageContext.APPLICATION_SCOPE); + for (int i = 0; i < al.size(); i++) { + ValueExpression ve = (ValueExpression) al.get(i); + %> + <%= i %> + <%= (Object) ve.getValue(pageContext.getELContext()) %> +
+ <% + } + pageContext.setAttribute("alist", null, PageContext.APPLICATION_SCOPE); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf new file mode 100644 index 0000000000..f66b4c6201 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf @@ -0,0 +1,38 @@ + + + + + + + +positiveSetVarNullValueTest + + + + + + + + + Var is set and value is null:
+ + Attribute removed. Test PASSED
+ + Map property, key2 should be removed, thus the value whem accessed, would be null:
+ + Map Key: 'key2' removed. Test PASSED
+ + + JavaBean property, properly value should be set to null:
+ + + Bean property null. Test PASSED
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp new file mode 100644 index 0000000000..86bb2e6d16 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp @@ -0,0 +1,54 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.HashMap,java.util.Map,com.sun.ts.tests.jstl.common.beans.SimpleBean" %> + + <% + HashMap map = new HashMap(); + map.put("key1", "value1"); + map.put("key2", "value2"); + pageContext.setAttribute("map", map); + %> + + + Var is set and value is null:
+ +
+ + Map property, key2 should be removed, thus the value whem accessed, would be null:
+ + <% + if (!map.containsKey("key2")) { + out.println("Map Key: 'key2' removed. Test PASSED
"); + } else { + out.println("Map Key: 'key2' not removed. Test FAILED
"); + } + %> + + JavaBean property, properly value should be set to null:
+ + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf new file mode 100644 index 0000000000..58ea77e834 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf @@ -0,0 +1,29 @@ + + + + + + + +positiveSetPropertyTest + + + + + + + Property value: nValue
+ + Property value: bValue
+ + Map value: mapVal1
+ + Map value: bodyMapVal1
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp new file mode 100644 index 0000000000..05c72200b0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.HashMap,java.util.Map,com.sun.ts.tests.jstl.common.beans.SimpleBean" %> + + <% + pageContext.setAttribute("nm", new String("value")); + pageContext.setAttribute("nv", new String("nValue")); + pageContext.setAttribute("mmap", new HashMap()); + %> + + + + + Property value:
+ + bValue + + Property value:
+ + Map value:
+ + bodyMapVal1 + + Map value:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf new file mode 100644 index 0000000000..cf6c768284 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf @@ -0,0 +1,35 @@ + + + + + + +positiveSetScopeTest + + + + + + + + + iPage found in page scope.
+ + ePage found in page scope.
+ + eRequest found in request scope.
+ + eSession found in session scope.
+ + eApplication found in application scope.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp new file mode 100644 index 0000000000..d15c1456f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf new file mode 100644 index 0000000000..b278bc41b0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveSetTest + + + + + + + someValue
+ staticValue
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp new file mode 100644 index 0000000000..8c05422ccf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("someVar", new String("someValue")); + %> + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml new file mode 100644 index 0000000000..0d634db5b2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml @@ -0,0 +1,23 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_iter_foreach_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf new file mode 100644 index 0000000000..7ddb8b9349 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeFEBeginTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp new file mode 100644 index 0000000000..f2255d4445 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf new file mode 100644 index 0000000000..7a9d958deb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeFEEndTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp new file mode 100644 index 0000000000..8214e136db --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf new file mode 100644 index 0000000000..63a52e5ea5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf @@ -0,0 +1,20 @@ + + + + + + +negativeFEExcBodyContentTest + + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp new file mode 100644 index 0000000000..542a12b219 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf new file mode 100644 index 0000000000..62bb0bd7dc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeFEItemsTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp new file mode 100644 index 0000000000..31e4712e38 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + Integer iFail = new Integer(3); + pageContext.setAttribute("fail", iFail); + %> + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf new file mode 100644 index 0000000000..0f245f6d24 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeFEStepTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp new file mode 100644 index 0000000000..ca61b37d1d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf new file mode 100644 index 0000000000..2181216fcc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf @@ -0,0 +1,20 @@ + + + + +positiveBodyBehaviorTest + + + + + body has been processed + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp new file mode 100644 index 0000000000..0374c89d35 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + body has been processed + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf new file mode 100644 index 0000000000..f4d10b3f40 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf @@ -0,0 +1,23 @@ + + + + + + +positiveForEachDeferredValueTest1 + + + 0 + One +
+ 1 + Two +
+ 2 + Three +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp new file mode 100644 index 0000000000..00a1a498d1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.Vector" %> +<%@ page import="jakarta.el.ValueExpression" %> + +<% Vector v = new Vector(); + v.add("One"); v.add("Two"); v.add("Three"); + pageContext.setAttribute("foo", v); +%> + + + + + + <% + ArrayList al = (ArrayList) pageContext.getAttribute("alist", PageContext.APPLICATION_SCOPE); + for (int i = 0; i < al.size(); i++) { + ValueExpression ve = (ValueExpression) al.get(i); + %> + <%= i %> + <%= (Object) ve.getValue(pageContext.getELContext()) %> +
+ <% + } + pageContext.setAttribute("alist", null, PageContext.APPLICATION_SCOPE); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf new file mode 100644 index 0000000000..c2dcb8ac29 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf @@ -0,0 +1,26 @@ + + + + + + +positiveForEachDeferredValueTest2 + + + 0 + Eenie +
+ 1 + Meenie +
+ 2 + Minie +
+ 3 + Moe +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp new file mode 100644 index 0000000000..cab0eaa8e3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + +<%@ page import="java.util.ArrayList" %> +<%@ page import="jakarta.el.ValueExpression" %> + +<% String str = "Eenie, Meenie, Minie, Moe"; + pageContext.setAttribute("doe", str); +%> + + + + + + <% + ArrayList al = (ArrayList) pageContext.getAttribute("alist", PageContext.APPLICATION_SCOPE); + for (int i = 0; i < al.size(); i++) { + ValueExpression ve = (ValueExpression) al.get(i); + %> + <%= i %> + <%= (Object) ve.getValue(pageContext.getELContext()) %> +
+ <% + } + pageContext.setAttribute("alist", null, PageContext.APPLICATION_SCOPE); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf new file mode 100644 index 0000000000..e063602dce --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf @@ -0,0 +1,23 @@ + + + + + + +positiveForEachDeferredValueTest3 + + + 0 + empire=New York +
+ 1 + golden=California +
+ 2 + sunshine=Florida +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp new file mode 100644 index 0000000000..6edb47c87f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.TreeMap" %> +<%@ page import="jakarta.el.ValueExpression" %> + +<% TreeMap map = new TreeMap(); + map.put("golden", "California"); + map.put("empire", "New York"); + map.put("sunshine", "Florida"); + pageContext.setAttribute("states", map); +%> + + + + + + <% + ArrayList al = (ArrayList) pageContext.getAttribute("alist", PageContext.APPLICATION_SCOPE); + for (int i = 0; i < al.size(); i++) { + ValueExpression ve = (ValueExpression) al.get(i); + %> + <%= i %> + <%= (Object) ve.getValue(pageContext.getELContext()) %> +
+ <% + } + pageContext.setAttribute("alist", null, PageContext.APPLICATION_SCOPE); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp new file mode 100644 index 0000000000..067eb401d5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="jakarta.tags.core" prefix="c" %> + + + Test FAILED + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf new file mode 100644 index 0000000000..1c5e5134db --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf @@ -0,0 +1,37 @@ + + + + +positiveItemsBeginTest + + + + + 6 + + 7 + + 8 + + 9 + + 10 + + + + 6 + + 7 + + 8 + + 9 + + 10 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp new file mode 100644 index 0000000000..4bcf791aff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + int[] iArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + int iBegin = 5; + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf new file mode 100644 index 0000000000..dfb360be89 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf @@ -0,0 +1,46 @@ + + + + + + + +positiveItemsCollectionTest + + + + + rOuter is of type:java.util.ArrayList + + aval1
+ + aval2
+ + + rOuter is of type:java.util.Vector + + aval1
+ + aval2
+ + + rOuter is of type:java.util.LinkedList + + vval1
+ + vval2
+ + + rOuter is of type:java.util.TreeSet + + tval1
+ + tval2
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp new file mode 100644 index 0000000000..60246978f5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp @@ -0,0 +1,48 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.*" %> + + <% + ArrayList aList = new ArrayList(); + aList.add("aval1"); + aList.add("aval2"); + Vector vector = new Vector(); + vector.add("aval1"); + vector.add("aval2"); + LinkedList lList = new LinkedList(); + lList.add("vval1"); + lList.add("vval2"); + TreeSet treeSet = new TreeSet(); + treeSet.add("tval1"); + treeSet.add("tval2"); + Object[] holder = { aList, vector, lList, treeSet }; + %> + + + + + +
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf new file mode 100644 index 0000000000..31422629d1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf @@ -0,0 +1,33 @@ + + + + +positiveItemsCommaSepStringTest + + + + + 1 + + 2 + + 3 + + 4 + + + + + 1 + + 2 + + 3 + + 4 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp new file mode 100644 index 0000000000..229c74427d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String comSep = "1,2,3,4"; + %> + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf new file mode 100644 index 0000000000..cc64c9a0e0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf @@ -0,0 +1,33 @@ + + + + +positiveItemsEndTest + + + + + + 1 + + 2 + + 3 + + 4 + + + + 1 + + 2 + + 3 + + 4 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp new file mode 100644 index 0000000000..36c3bcd302 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + int[] iArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + int iEnd = 3; + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf new file mode 100644 index 0000000000..7b3da250b9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf @@ -0,0 +1,24 @@ + + + + + +positiveItemsEnumerationTest + + + + + val1 + + val2 + + val3 + + val4 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp new file mode 100644 index 0000000000..345b4aff6a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Vector,java.util.Enumeration" %> + + <% + Vector vector = new Vector(); + vector.add("val1"); + vector.add("val2"); + vector.add("val3"); + vector.add("val4"); + pageContext.setAttribute("eNum", vector.elements()); + Enumeration elE = vector.elements(); + Enumeration elR = vector.elements(); + %> + + + <% + String rVari = (String) pageContext.findAttribute("rVar"); + String rVare = (String) elR.nextElement(); + if (rVari.equals(rVare)) { + out.print(rVari); + } else { + out.print("Incorrect order"); + } + %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp new file mode 100644 index 0000000000..a6708c3552 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.HashSet,java.util.Iterator,java.util.ArrayList,java.util.Arrays" %> + + <% + ArrayList lTest = new ArrayList(); + ArrayList lControl = new ArrayList(); + + HashSet hSet = new HashSet(); + hSet.add("val1"); + hSet.add("val2"); + hSet.add("var3"); + hSet.add("var4"); + pageContext.setAttribute("hashSet", hSet.iterator()); + for (Iterator rIter = hSet.iterator(); rIter.hasNext(); ) { + lControl.add(rIter.next()); + } + + %> + + + <% + lTest.add(pageContext.findAttribute("rVar")); + %> + + + <% + String[] test = + (String[]) lTest.toArray(new String[lTest.size()]); + String[] control = + (String[]) lControl.toArray(new String[lControl.size()]); + + Arrays.sort(test); + Arrays.sort(control); + + if (!Arrays.equals(test, control)) { + out.println("Test FAILED. Iteration produced unexpected results."); + out.println("Expected values:"); + for (int i = 0; i < control.length; i++) { + out.println('\t' + control[i]); + } + out.println("Values received:"); + for (int i = 0; i < test.length; i++) { + out.println('\t' + test[i]); + } + } + + %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp new file mode 100644 index 0000000000..6c011bbbbf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp @@ -0,0 +1,70 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.*" %> + + <% + HashMap hashMap = new HashMap(); + hashMap.put("map1", "val1"); + hashMap.put("map2", "val2"); + hashMap.put("map3", "val3"); + Hashtable table = new Hashtable(); + table.put("tab1", "val1"); + table.put("tab2", "val2"); + table.put("tab3", "val3"); + Object[] holder = { hashMap, table }; + Iterator hMapI = hashMap.entrySet().iterator(); + Iterator hTabI = table.entrySet().iterator(); + %> + + + <% + Map.Entry test = (Map.Entry) pageContext.findAttribute("rInner"); + if (!hMapI.hasNext()) { + out.println("Test FAILED. The forEach action performed more iterations than necessary."); + } + Map.Entry control = (Map.Entry) hMapI.next(); + if (!test.getKey().equals(control.getKey()) + || !test.getValue().equals(control.getValue())) { + out.println("Test FAILED. Iteration did not work as expected."); + out.println("Expected key/value pair of : " + control.getKey() + ", " + control.getValue()); + out.println("Received: " + test.getKey() + ", " + test.getValue()); + } + %> + + + + <% + Map.Entry test = (Map.Entry) pageContext.findAttribute("rInner"); + if (!hTabI.hasNext()) { + out.println("Test FAILED. The forEach action performed more iterations than necessary."); + } + Map.Entry control = (Map.Entry) hTabI.next(); + if (!test.getKey().equals(control.getKey()) + || !test.getValue().equals(control.getValue())) { + out.println("Test FAILED. Iteration did not work as expected."); + out.println("Expected key/value pair of : " + control.getKey() + ", " + control.getValue()); + out.println("Received: " + test.getKey() + ", " + test.getValue()); + } + %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf new file mode 100644 index 0000000000..26469fd76c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf @@ -0,0 +1,14 @@ + + + + +positiveItemsNullTest + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp new file mode 100644 index 0000000000..37c40ff218 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf new file mode 100644 index 0000000000..a089247eb7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf @@ -0,0 +1,83 @@ + + + + + + + +positiveItemsObjArrayTest + + + + + + rInner is of type:java.lang.Byte
+ 97
+ + rInner is of type:java.lang.Byte
+ 98
+ + + + rInner is of type:java.lang.Boolean
+ true
+ + rInner is of type:java.lang.Boolean
+ false
+ + + + rInner is of type:java.lang.Character
+ a
+ + rInner is of type:java.lang.Character
+ b
+ + + + rInner is of type:java.lang.Short
+ 1
+ + rInner is of type:java.lang.Short
+ 2
+ + + + rInner is of type:java.lang.Integer
+ 1
+ + rInner is of type:java.lang.Integer
+ 2
+ + + + rInner is of type:java.lang.Long
+ 1
+ + rInner is of type:java.lang.Long
+ 2
+ + + + rInner is of type:java.lang.Float
+ 1.0
+ + rInner is of type:java.lang.Float
+ 2.0
+ + + + rInner is of type:java.lang.Double
+ 1.0
+ + rInner is of type:java.lang.Double
+ 1.0
+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp new file mode 100644 index 0000000000..fff1a4194a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.ArrayList" %> + + <% + Byte[] bArray = { new Byte((byte) 'a'), new Byte((byte) 'b') }; + Boolean[] boolArray = { new Boolean(true), new Boolean(false) }; + Character[] cArray = { new Character('a'), new Character('b') }; + Short[] sArray = { new Short((short) 1), new Short((short) 2) }; + Integer[] iArray = { new Integer(1), new Integer(2) }; + Long[] lArray = { new Long(1L), new Long(2L) }; + Float[] fArray = { new Float(1.0f), new Float(2.0f) }; + Double[] dArray = { new Double(1.0d), new Double(1.0d) }; + Object[] holder = { bArray, boolArray, cArray, sArray, iArray, lArray, + fArray, dArray }; + %> + + + +
+
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf new file mode 100644 index 0000000000..3b44dc3c8e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf @@ -0,0 +1,82 @@ + + + + + + +positiveItemsPrimArrayTest + + + + + + rInner is of type:java.lang.Byte
+ 97
+ + rInner is of type:java.lang.Byte
+ 98
+ + + + rInner is of type:java.lang.Boolean
+ true
+ + rInner is of type:java.lang.Boolean
+ false
+ + + + rInner is of type:java.lang.Character
+ a
+ + rInner is of type:java.lang.Character
+ b
+ + + + rInner is of type:java.lang.Short
+ 1
+ + rInner is of type:java.lang.Short
+ 2
+ + + + rInner is of type:java.lang.Integer
+ 1
+ + rInner is of type:java.lang.Integer
+ 2
+ + + + rInner is of type:java.lang.Long
+ 1
+ + rInner is of type:java.lang.Long
+ 2
+ + + + rInner is of type:java.lang.Float
+ 1.0
+ + rInner is of type:java.lang.Float
+ 2.0
+ + + + rInner is of type:java.lang.Double
+ 1.0
+ + rInner is of type:java.lang.Double
+ 2.0
+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp new file mode 100644 index 0000000000..540b2df542 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + byte[] aByte = { (byte) 'a', (byte) 'b' }; + boolean[] aBoolean = { true, false }; + char[] aChar = { 'a', 'b' }; + short[] aShort = { (short) 1, (short) 2 }; + int[] aInt = { 1, 2 }; + long[] aLong = { 1L, 2L }; + float[] aFloat = { 1.0f, 2.0f }; + double[] aDouble = { 1.0d, 2.0d }; + Object[] holder = { aByte, aBoolean, aChar, aShort, + aInt, aLong, aFloat, aDouble }; + %> + + + + +
+
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf new file mode 100644 index 0000000000..5ee5dcf89f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf @@ -0,0 +1,36 @@ + + + + +positiveItemsStepTest + + + + + + 1 + + 3 + + 5 + + 7 + + 9 + + + + 1 + + 3 + + 5 + + 7 + + 9 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp new file mode 100644 index 0000000000..27fdc14d75 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + int[] iArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + int iStep = 2; + %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf new file mode 100644 index 0000000000..8ccd0efa6b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf @@ -0,0 +1,21 @@ + + + + + + +positiveNoItemsIterationTest + + + + + rVar is of type:java.lang.Integer + + rVar is of type:java.lang.Integer + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp new file mode 100644 index 0000000000..23bfa15eb4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf new file mode 100644 index 0000000000..003c13943c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf @@ -0,0 +1,26 @@ + + + + + + +positiveVarStatusTest + + + + rstatus is of type:java.lang.String + + rstatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ + rstatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ + rstatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ + rstatus not found in specified scope:page.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp new file mode 100644 index 0000000000..99593ab16d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String[] sArray = { "one", "two", "three" }; + pageContext.setAttribute("status", "val"); + pageContext.setAttribute("rstatus", "rval"); + %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf new file mode 100644 index 0000000000..1c6eb5d866 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf @@ -0,0 +1,24 @@ + + + + + + + +positiveVarTest + + + + rVal is of type:java.lang.Boolean + + rVal is of type:java.lang.String + + rVal is of type:java.lang.Integer + + rVal is of type:Error: Attribute, rVal, not found in any scope
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp new file mode 100644 index 0000000000..fe309c44a3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.ArrayList" %> + + <% + pageContext.setAttribute("eVal", new Boolean("true")); + pageContext.setAttribute("rVal", new Boolean("true")); + ArrayList simpleList = new ArrayList(); + simpleList.add("sample1"); + simpleList.add(new Integer("123")); + %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml new file mode 100644 index 0000000000..8e3de987e6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml @@ -0,0 +1,23 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_iter_fortok_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf new file mode 100644 index 0000000000..e6038b1f56 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf @@ -0,0 +1,18 @@ + + + + + +negativeFTBeginTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp new file mode 100644 index 0000000000..3fe3d1608d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf new file mode 100644 index 0000000000..be8ab5ec48 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf @@ -0,0 +1,18 @@ + + + + + +negativeFTEndTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp new file mode 100644 index 0000000000..3088baac74 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf new file mode 100644 index 0000000000..025db8c6ca --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeFTExcBodyContentTest + + + + + + + The expected Exception java.lang.IllegalArgumentException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp new file mode 100644 index 0000000000..2884cd111f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf new file mode 100644 index 0000000000..4bbc737929 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf @@ -0,0 +1,18 @@ + + + + + +negativeFTStepTypeTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp new file mode 100644 index 0000000000..ab51e74527 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("ex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf new file mode 100644 index 0000000000..f6d6b62b36 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf @@ -0,0 +1,37 @@ + + + + +positiveBeginTest + + + + + 5 + + 6 + + 7 + + 8 + + 9 + + + + 5 + + 6 + + 7 + + 8 + + 9 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp new file mode 100644 index 0000000000..0d2c3e8e31 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String tString = "0|1|2|3|4|5|6|7|8|9"; + pageContext.setAttribute("str", tString); + int iBegin = 5; + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf new file mode 100644 index 0000000000..be0822ce3b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf @@ -0,0 +1,18 @@ + + + + +positiveBodyBehaviorTest + + + + + Body Content + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp new file mode 100644 index 0000000000..0cb3add239 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body Content + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf new file mode 100644 index 0000000000..0e31882696 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf @@ -0,0 +1,16 @@ + + + + +positiveDelimsNullTest + + + + + 1,2 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp new file mode 100644 index 0000000000..b88c52ca88 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf new file mode 100644 index 0000000000..834e663ce7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf @@ -0,0 +1,35 @@ + + + + + + +positiveEndTest + + + + + 0 + + 1 + + 2 + + 3 + + + + 0 + + 1 + + 2 + + 3 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp new file mode 100644 index 0000000000..b3e5c02f00 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String tString = "0|1|2|3|4|5|6|7|8|9"; + int iEnd = 3; + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf new file mode 100644 index 0000000000..436d6aabbf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf @@ -0,0 +1,14 @@ + +positiveForEachDeferredValueTest2 + + 0 + Tiger Woods +
+ 1 + Robert Trent Jones +
+ 2 + Pebble Beach +
+ + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp new file mode 100644 index 0000000000..5ad2127144 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + +<%@ page import="java.util.ArrayList" %> +<%@ page import="jakarta.el.ValueExpression" %> + + + + + + + + + <% + ArrayList al = (ArrayList) pageContext.getAttribute("alist", PageContext.APPLICATION_SCOPE); + for (int i = 0; i < al.size(); i++) { + ValueExpression ve = (ValueExpression) al.get(i); + %> + <%= i %> + <%= (Object) ve.getValue(pageContext.getELContext()) %> +
+ <% + } + pageContext.setAttribute("alist", null, PageContext.APPLICATION_SCOPE); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp new file mode 100644 index 0000000000..75d59514b2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="jakarta.tags.core" prefix="c" %> + + + Test FAILED + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf new file mode 100644 index 0000000000..7e1cb8df78 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf @@ -0,0 +1,31 @@ + + + + +positiveForTokensTest + + + + + a
+ + b
+ + c
+ + $d
+ + + + a
+ + b
+ + c
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp new file mode 100644 index 0000000000..a9cb201312 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String complexString = "a###b c# $d"; + String complexDelim = "# "; + %> + + + +
+
+ + +
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf new file mode 100644 index 0000000000..a0500240e8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf @@ -0,0 +1,14 @@ + + + + +positiveItemsDelimsNullTest + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp new file mode 100644 index 0000000000..b962e16408 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf new file mode 100644 index 0000000000..954b9d29a3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf @@ -0,0 +1,14 @@ + + + + +positiveItemsNullTest + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp new file mode 100644 index 0000000000..7441338f28 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf new file mode 100644 index 0000000000..deb1c7598e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf @@ -0,0 +1,39 @@ + + + + + + +positiveStepTest + + + + + 0 + + 2 + + 4 + + 6 + + 8 + + + + 0 + + 2 + + 4 + + 6 + + 8 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp new file mode 100644 index 0000000000..3c3c1ffc38 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String tString = "0|1|2|3|4|5|6|7|8|9"; + int iStep = 2; + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf new file mode 100644 index 0000000000..b266efe359 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf @@ -0,0 +1,19 @@ + + + + +positiveVarStatusTest + + + + + rStatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ + rStatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp new file mode 100644 index 0000000000..101d65a591 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml new file mode 100644 index 0000000000..e9e4296eaa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_iter_lstat_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf new file mode 100644 index 0000000000..8b48e43b45 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf @@ -0,0 +1,56 @@ + + + + +positiveLoopTagStatusTest + + + + + one
+ 0
+ 1
+ true
+ false
+ 0
+ 2
+ 1
+ + two
+ 1
+ 2
+ false
+ false
+ 0
+ 2
+ 1
+ + three
+ 2
+ 3
+ false
+ true
+ 0
+ 2
+ 1
+ + + + + + Begin not specified + + + End not specified + + + Step not specified + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp new file mode 100644 index 0000000000..0228ee6b0b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String[] sArray = { "one", "two", "three" }; + pageContext.setAttribute("sArray", sArray); + %> + +
+
+
+
+
+
+
+
+
+ + + + + Begin not specified + + + End not specified + + + Step not specified + + + +
+ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp new file mode 100644 index 0000000000..30c6b6ccf1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<%! + public void throwIt() throws java.io.IOException { + throw new java.io.IOException("IOException Thrown from included resource"); + } +%> +<% throwIt(); %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp new file mode 100644 index 0000000000..07430abb91 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); %> diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp new file mode 100644 index 0000000000..50a1e96f31 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<% response.setStatus(HttpServletResponse.SC_CREATED); %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp new file mode 100644 index 0000000000..23b9f446ba --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% response.setStatus(HttpServletResponse.SC_GONE); %> diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp new file mode 100644 index 0000000000..870c1dd0b3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<% response.sendRedirect("import.txt"); %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp new file mode 100644 index 0000000000..bd3250a894 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<%! + public void throwIt() { + throw new RuntimeException("RuntimeException Thrown from included resource"); + } +%> +<% throwIt(); %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp new file mode 100644 index 0000000000..21bbf6dfd3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<%! + public void throwIt() throws ServletException { + throw new ServletException("ServletException Thrown from included resource"); + } +%> +<% throwIt(); %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp new file mode 100644 index 0000000000..78abf2308b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> + +JSP Page + + +<%! + public void throwIt() throws ServletException { + throw new ServletException("ServletException Thrown from included resource", + new IllegalStateException("Root Message")); + } +%> +<% throwIt(); %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp new file mode 100644 index 0000000000..550036fb3b Binary files /dev/null and b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp differ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp new file mode 100644 index 0000000000..2bd20b98c8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% + if (application.getAttribute("app") != null) { + out.println("Application: Available
"); + } else { + out.println("Application: Not Available
"); + } + if (session.getAttribute("sess") != null) { + out.println("Session: Avaliable
"); + } else { + out.println("Session: Not Available
"); + } + if (request.getAttribute("req") != null) { + out.println("Request: Available
"); + } else { + out.println("Request: Not Available
"); + } + if (request.getParameter("reqpar") != null) { + out.println("Request Param: Available
"); + } else { + out.println("Request Param: Not Available
"); + } +%> diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt new file mode 100644 index 0000000000..99a0be997e Binary files /dev/null and b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt differ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp new file mode 100644 index 0000000000..4b5faf2e7d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@page contentType="text/html"%> +<% + if (request.getParameter("testparm") != null) { + out.println("testparm found!
"); + } else { + out.println("testparm was not available!
"); + } +%> diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt new file mode 100644 index 0000000000..3f60cf5872 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt @@ -0,0 +1,2 @@ +Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml new file mode 100644 index 0000000000..fb8557dfad --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml @@ -0,0 +1,32 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_url_import_web + + + /encoding/* + UTF-16 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf new file mode 100644 index 0000000000..c3a93bb67f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf @@ -0,0 +1,27 @@ + + + + + + +negativeImportAbsResourceNon2xxTest + + + + Check the message:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The expected Exception text was found in the Exception message!
+ Check the status code:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The expected Exception text was found in the Exception message!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp new file mode 100644 index 0000000000..363bdd1fad --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Check the message:
+ + + +
+ Check the status code:
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf new file mode 100644 index 0000000000..e01c6f47eb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf @@ -0,0 +1,21 @@ + + + + + + +negativeImportCtxInvalidValueTest + + + + + + Invalid value provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp new file mode 100644 index 0000000000..51d934dcef --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("rex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid value provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf new file mode 100644 index 0000000000..891651a26e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf @@ -0,0 +1,21 @@ + + + + + + +negativeImportCtxUrlInvalidValueTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp new file mode 100644 index 0000000000..a8bcd0be6f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + Object o = pageContext.getAttribute("rex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf new file mode 100644 index 0000000000..17df1403d8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf @@ -0,0 +1,26 @@ + + + + + + +negativeImportRequestDispatcherNon2xxTest + + + + Check the message:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The expected Exception text was found in the Exception message! + Check the status code:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The expected Exception text was found in the Exception message! + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp new file mode 100644 index 0000000000..d6f7ce06ad --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Check the message:
+ + + + + Check the status code:
+ + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf new file mode 100644 index 0000000000..5f83598b9e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf @@ -0,0 +1,30 @@ + + + + + + +negativeImportRequestDispatcherRTIOExceptionTest + + + + IOException:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause Exception java.io.IOException was of the expected type.
+The expected Exception text was found in the Exception message!
+ ServletException:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause Exception java.lang.RuntimeException was of the expected type.
+The expected Exception text was found in the Exception message!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp new file mode 100644 index 0000000000..3a021c5bd1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + IOException:
+ + + +
+ ServletException:
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf new file mode 100644 index 0000000000..552931a544 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf @@ -0,0 +1,31 @@ + + + + + + +negativeImportRequestDispatcherServletExceptionTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause Exception java.lang.IllegalStateException was of the expected type.
+The expected Exception text was found in the Exception message!
+
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause Exception jakarta.servlet.ServletException was of the expected type.
+The expected Exception text was found in the Exception message!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp new file mode 100644 index 0000000000..f60a662c88 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + +
+
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf new file mode 100644 index 0000000000..32491fa86d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf @@ -0,0 +1,18 @@ + + + + + + +negativeImportUrlEmptyTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp new file mode 100644 index 0000000000..97aafbc672 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf new file mode 100644 index 0000000000..ca636da12f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf @@ -0,0 +1,19 @@ + + + + + + +negativeImportUrlInvalidTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp new file mode 100644 index 0000000000..27c3722d89 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf new file mode 100644 index 0000000000..9bf85860f0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf @@ -0,0 +1,18 @@ + + + + + + +negativeImportUrlNullTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp new file mode 100644 index 0000000000..be64360eae --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf new file mode 100644 index 0000000000..80e51fd5d7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf @@ -0,0 +1,24 @@ + + + + + + +positiveImportAbsUrlEnvPropTest + + + + + +Application: Available
+Session: Not Available
+Request: Not Available
+Request Param: Not Available
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp new file mode 100644 index 0000000000..bf531f7cba --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + StringBuffer sb = new StringBuffer(75); + sb.append(request.getScheme()).append("://"); + sb.append(request.getServerName()).append(":"); + sb.append(request.getServerPort()); + sb.append("/jstl_core_url_import_web/env.jsp"); + application.setAttribute("app", "available"); + session.setAttribute("sess", "available"); + request.setAttribute("req", "available"); + %> + + <% + application.removeAttribute("app"); + session.removeAttribute("sess"); + %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf new file mode 100644 index 0000000000..b79c2609d9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveImportAbsUrlTest + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp new file mode 100644 index 0000000000..eaea54e8e9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf new file mode 100644 index 0000000000..766f0ff501 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf @@ -0,0 +1,19 @@ + + + + +positiveImportBodyParamTest + + + + + + +testparm found!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp new file mode 100644 index 0000000000..4cb7dbac32 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf new file mode 100644 index 0000000000..b96c98f551 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf @@ -0,0 +1,26 @@ + + + + + + +positiveImportCharEncodingNullEmptyTest + + + + + + + + +

Test PASSED.  The result of the import with charEncoding
+                 specified as null or empty, is the same as if it was
+                 not specified.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp new file mode 100644 index 0000000000..7e59e55c98 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + +
Test PASSED.  The result of the import with charEncoding
+                 specified as null or empty, is the same as if it was
+                 not specified.
+
+ +
Test FAILED.  The result of the import with charEncoding
+                 specified as null or empty, is not the same as if it
+                 was not specified
+                 Not Specified: 
+                 Null: 
+                 Empty: 
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf new file mode 100644 index 0000000000..39bfce987e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf @@ -0,0 +1,31 @@ + + + + + + + +positiveImportCharEncodingTest + + + + charEncoding import: var or varReader not specified.
+ Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... +
+ charEncoding import: var is specified varReader is not.
+ + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... +
+ charEncoding import: varReader is specified, var is not.
+ + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp new file mode 100644 index 0000000000..59f52daf59 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.io.Reader,java.io.BufferedReader,java.io.IOException" %> + + + + charEncoding import: var or varReader not specified.
+
+ charEncoding import: var is specified varReader is not.
+ +
+ charEncoding import: varReader is specified, var is not.
+ + <% + BufferedReader read = new BufferedReader( + (Reader) pageContext.getAttribute("rtReader")); + try { + for (String line = read.readLine(); line != null; line = read.readLine()) { + out.println(line); + } + } catch (IOException ioe) { + out.println("Unexpected IOException from Reader!"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf new file mode 100644 index 0000000000..b6908beab8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf @@ -0,0 +1,15 @@ + + + + +positiveImportCtxRelUrlTest + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp new file mode 100644 index 0000000000..dedd15e58f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf new file mode 100644 index 0000000000..da18f3a044 Binary files /dev/null and b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf differ diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp new file mode 100644 index 0000000000..7425c9bc74 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="jakarta.tags.core" prefix="c" %> + +<%-- If encoding is not specified, then use the encoding specfied + in the response. In this case, the response will be UTF-16. --%> + + + +<%-- If encoding is not specified, and no encoding is specified in the + response of the imported resource, the default of ISO-8859-1 + will be used. --%> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf new file mode 100644 index 0000000000..25f53a7f04 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveImportFollowRedirectTest + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp new file mode 100644 index 0000000000..63b8b1b1cb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf new file mode 100644 index 0000000000..f884a4fcd9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf @@ -0,0 +1,16 @@ + + + + +positiveImportPageRelUrlTest + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp new file mode 100644 index 0000000000..9435c1338b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf new file mode 100644 index 0000000000..65d4b87a93 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf @@ -0,0 +1,24 @@ + + + + + + +positiveImportRelUrlEnvPropTest + + + + + +Application: Available
+Session: Avaliable
+Request: Available
+Request Param: Available
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp new file mode 100644 index 0000000000..f7854b5d4a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + application.setAttribute("app", "available"); + session.setAttribute("sess", "available"); + request.setAttribute("req", "available"); + %> + + <% + application.removeAttribute("app"); + session.removeAttribute("sess"); + %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf new file mode 100644 index 0000000000..ba07f271a3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf @@ -0,0 +1,34 @@ + + + + + + +positiveImportScopeTest + + + + + + + + + + + rpageDef found in page scope.
+ + rexpPage found in page scope.
+ + rexpRequest found in request scope.
+ + rexpSession found in session scope.
+ + rexpApplication found in application scope.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp new file mode 100644 index 0000000000..0564c942fd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf new file mode 100644 index 0000000000..aaaf03421b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf @@ -0,0 +1,21 @@ + + + + +positiveImportUrlTest + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp new file mode 100644 index 0000000000..ab5e1f545e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + String url = "import.txt"; + %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf new file mode 100644 index 0000000000..5ec0e3b327 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf @@ -0,0 +1,25 @@ + + + + + + + +positiveImportVarReaderTest + + + + + reader is of type java.io.Reader
+ Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + reader not found in specified scope:page.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp new file mode 100644 index 0000000000..5070eae1a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.io.Reader,java.io.BufferedReader,java.io.IOException" %> + + + + + + <% + BufferedReader read = new BufferedReader( + (Reader) pageContext.getAttribute("reader")); + String line = null; + try { + while((line = read.readLine()) != null) { + out.println(line); + } + } catch (IOException ioe) { + out.println("Unexpected IOException from Reader!"); + } + %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf new file mode 100644 index 0000000000..07f05bdc73 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf @@ -0,0 +1,17 @@ + + + + +positiveImportVarTest + + + + + Thu Mar 7 11:55:15 EST 2002 +Arbitraty text.... + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp new file mode 100644 index 0000000000..669440ede1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp new file mode 100644 index 0000000000..9e577d31ed --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@page contentType="text/html"%> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml new file mode 100644 index 0000000000..1bde579660 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_url_param_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf new file mode 100644 index 0000000000..b9f1810a4d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf @@ -0,0 +1,21 @@ + + + + + + +negativeParamExcBodyContentTest + + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp new file mode 100644 index 0000000000..3daea2c1d8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + <% + Object o = pageContext.getAttribute("rex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf new file mode 100644 index 0000000000..d0588c461e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf @@ -0,0 +1,26 @@ + + + + +positiveParamAggregationTest + + + + + + + + + + testparm found! Value is: newvalue + + + testparm2 found! Value is: origvalue + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp new file mode 100644 index 0000000000..95c056ce46 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf new file mode 100644 index 0000000000..2fa74b0882 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf @@ -0,0 +1,31 @@ + + + + + + +positiveParamBodyValueTest + + + + + + + + + + + + testparm found! Value is: testvalue + + + testparm2 found! Value is: testvalue2 + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp new file mode 100644 index 0000000000..92a695cccd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + testvalue + + + testvalue2 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf new file mode 100644 index 0000000000..891052b79f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf @@ -0,0 +1,16 @@ + + + + +positiveParamEncodingTest + + + + + Params properly encoded
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp new file mode 100644 index 0000000000..9891260ab2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + 0=0 + + + <% + String url = (String) pageContext.getAttribute("rUrl"); + if (url.toLowerCase().indexOf("received+5") > -1 && + url.toLowerCase().indexOf("0%3d0") > -1) { + out.println("Params properly encoded
"); + } else { + out.println("Params not encoded!
\n" + + "url -> " + url + "
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf new file mode 100644 index 0000000000..bd5073630f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf @@ -0,0 +1,26 @@ + + + + + + +positiveParamNameNullEmptyTest + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp new file mode 100644 index 0000000000..e38d427f04 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf new file mode 100644 index 0000000000..1596294f9b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf @@ -0,0 +1,26 @@ + + + + +positiveParamNameValueTest + + + + + + + + + + testparm found! Value is: parmvalue + + + testparm2 found! Value is: parmvalue2 + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp new file mode 100644 index 0000000000..b1a871db94 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf new file mode 100644 index 0000000000..dd3f0173d4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf @@ -0,0 +1,25 @@ + + + + +positiveParamValueNullTest + + + + + + + + + + testparm found! Value is: + + + testparm2 found! Value is: value2 + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp new file mode 100644 index 0000000000..5bbf819855 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml new file mode 100644 index 0000000000..3132952bc0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_url_redirect_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf new file mode 100644 index 0000000000..8ced20eced --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf @@ -0,0 +1,29 @@ + + + + + + +negativeRedirectContextUrlInvalidValueTest + + + + Context value specified without leading slash:
+ + + Invalid value provided to context attribute, and Exception was thrown. Test PASSED!
+ + Context specified relative path without leading slash:
+ + + Invalid value provided to value attribute, and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp new file mode 100644 index 0000000000..bbf88b97ff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp @@ -0,0 +1,61 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Context value specified without leading slash:
+ + + + <% + Object o = pageContext.getAttribute("rictx"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid value provided to context attribute, and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> + Context specified relative path without leading slash:
+ + + + <% + o = pageContext.getAttribute("rival"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid value provided to value attribute, and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf new file mode 100644 index 0000000000..40ae946276 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf @@ -0,0 +1,20 @@ + + + + + + +negativeRedirectExcBodyContentTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp new file mode 100644 index 0000000000..3c1a0999bb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + <% + Object o = pageContext.getAttribute("rex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp new file mode 100644 index 0000000000..0525b9dd7b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page session="false" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp new file mode 100644 index 0000000000..87a5c934e7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp @@ -0,0 +1,51 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page session="false" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml new file mode 100644 index 0000000000..6599761f9b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml @@ -0,0 +1,26 @@ + + + + + Core Tag Library TCK Tests for JSTL + jstl_core_url_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf new file mode 100644 index 0000000000..f142c2f034 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf @@ -0,0 +1,29 @@ + + + + + + +negativeUrlContextUrlInvalidValueTest + + + + Context value specified without leading slash:
+ + + Invalid value provided to context attribute, and Exception was thrown. Test PASSED!
+ + Context specified relative path without leading slash:
+ + + Invalid value provided to value attribute, and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp new file mode 100644 index 0000000000..a8dda7bd1c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp @@ -0,0 +1,61 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Context value specified without leading slash:
+ + + + <% + Object o = pageContext.getAttribute("rictx"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid value provided to context attribute, and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> + Context specified relative path without leading slash:
+ + + + <% + o = pageContext.getAttribute("rival"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid value provided to value attribute, and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf new file mode 100644 index 0000000000..1cca86c797 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf @@ -0,0 +1,20 @@ + + + + + + +negativeUrlExcBodyContentTest + + + + + + Invalid type provided to action and Exception was thrown. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp new file mode 100644 index 0000000000..30589aeb86 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + <% + Object o = pageContext.getAttribute("rex"); + if (o != null) { + if (o instanceof Throwable) { + out.println("Invalid type provided to action and Exception was thrown. Test PASSED!
"); + } else { + out.println("[Error]: Var was exported but was not an instance of Throwable!
"); + } + } else { + out.println("[Error]: No Exception thrown!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf new file mode 100644 index 0000000000..dabc177792 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveUrlAbsUrlNotRewrittenTest + + + + No JSESSIONID information should be present in the rewritten URL:
+ + URL not rewritten. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp new file mode 100644 index 0000000000..22ac70773d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + No JSESSIONID information should be present in the rewritten URL:
+ + <% + String url1 = (String) pageContext.getAttribute("rUrl"); + if(url1.toLowerCase().indexOf("jsessionid") < 0 ) { + out.println("URL not rewritten. Test PASSED!
"); + } else { + out.println("URL incorrectly rewritten: " + url1 + "
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf new file mode 100644 index 0000000000..db005152a1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf @@ -0,0 +1,18 @@ + + + + + + + +positiveUrlContextTest + + + + /jstltck-fmt/jstl/core/fmt/non.jsp + /jstltck-core/jstl/core/urlresource/importtag/import.txt + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp new file mode 100644 index 0000000000..8b98e768a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page session="false" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp new file mode 100644 index 0000000000..eeed7b8fb4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf new file mode 100644 index 0000000000..0556f35098 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveUrlNoCharEncodingTest + + + + + No character encoding occurred.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp new file mode 100644 index 0000000000..46384f9fc0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + <% + String expVal = (String) pageContext.getAttribute("eUrl"); + String retVal = (String) pageContext.getAttribute("rVar"); + expVal = expVal.substring(expVal.indexOf('?')); + retVal = retVal.substring(retVal.indexOf('?')); + if (expVal.equals(retVal)) { + out.println("No character encoding occurred.
"); + } else { + out.println("Character encoding occurred!
\n" + + "expected: " + expVal + "
\n" + + "returned: " + retVal + "
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf new file mode 100644 index 0000000000..eb974bcb74 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf @@ -0,0 +1,21 @@ + + + + + + +positiveUrlParamsBodyTest + + + + + Expected parameter found. Test PASSED!
+ + + Expected parameter found. Test PASSED!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp new file mode 100644 index 0000000000..ef3c374b17 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp @@ -0,0 +1,51 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <% + String retVal = (String) pageContext.getAttribute("rUrl"); + if (retVal.indexOf("parm1=value1") > -1) { + out.println("Expected parameter found. Test PASSED!
"); + } else { + out.println("Test FAILED!
\n" + + "Unable to find request parameter 'parm1'
\n" + + "Returned value: " + retVal + "
"); + } + %> + + + + <% + retVal = (String) pageContext.getAttribute("rcUrl"); + if (retVal.indexOf("parm1=value1") > -1) { + out.println("Expected parameter found. Test PASSED!
"); + } else { + out.println("Test FAILED!
\n" + + "Unable to find request parameter 'parm1'
\n" + + "Returned value: " + retVal + "
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf new file mode 100644 index 0000000000..f6a2d8b4cd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf @@ -0,0 +1,26 @@ + + + + + + +positiveUrlRelUrlRewrittenTest + + + + + Context-relative path properly rewritten with session information.
+ + Page-relative path:
+ + Page-relative path properly rewritten with session information.
+
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp new file mode 100644 index 0000000000..5039d3f574 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp @@ -0,0 +1,48 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + <% + String url = (String) pageContext.getAttribute("rRes"); + if (url.toLowerCase().indexOf("jsessionid") > -1) { + out.println("Context-relative path properly rewritten with session information.
"); + } else { + out.println("[ERROR]: URL not rewritten: " + url + "
"); + } + %> + Page-relative path:
+ + <% + url = (String) pageContext.getAttribute("eRes"); + if (url.toLowerCase().indexOf("jsessionid") > -1) { + out.println("Page-relative path properly rewritten with session information.
"); + } else { + out.println("[ERROR]: URL not rewritten: " + url + "
"); + } + %>
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf new file mode 100644 index 0000000000..0686efac56 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf @@ -0,0 +1,32 @@ + + + + + + +positiveUrlScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp new file mode 100644 index 0000000000..5ab06e788d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf new file mode 100644 index 0000000000..710fadd93e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf @@ -0,0 +1,19 @@ + + + + +positiveUrlValueVarTest + + + + + + The <c:url> action returned expected value.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp new file mode 100644 index 0000000000..5e675b37d3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + <% + String encodeVal = response.encodeURL("/jstl_core_url_web/rewrite"); + String rtValue = (String) pageContext.getAttribute("rtVal"); + String rtsValue = (String) pageContext.getAttribute("rtsVal"); + if (rtValue.equals(encodeVal) && rtsValue.equals(encodeVal)) { + out.println("The <c:url> action returned expected value.
"); + } else { + out.println("The <c:url> action returned value different from that " + + "returned by response.encodeUrl()!
"); + out.println("From url action: " + rtValue); + out.println("From encodeURL: " + encodeVal); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml new file mode 100644 index 0000000000..52ec6a2a41 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml @@ -0,0 +1,34 @@ + + + + + EL/TLV/URI Tag Library TCK Tests for JSTL + jstl_etu_config_web + + jakarta.servlet.jsp.jstl.fmt.locale + en-US + + + simpleParam + Context Parameter Value Obtained + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf new file mode 100644 index 0000000000..b4b49ab51f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf @@ -0,0 +1,20 @@ + + + + + +positiveConfigFindTest + + + + Expected value returned from find()
+ +Context initialization parameter obtained. + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp new file mode 100644 index 0000000000..c1eb7393c5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp @@ -0,0 +1,54 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + <% + // Set the same variable in diffent scopes, with different values. + Config.set(application, Config.FMT_LOCALE, "scopedObject"); + + // Find the value in the PageContext. + String found = (String) Config.find(pageContext, Config.FMT_LOCALE); + + + if (found.equals("scopedObject")) { + out.println("Expected value returned from find()
\n"); + } else { + out.println("Unexpected value returned from find()
\n"); + out.println("Value: " + found + "
\n"); + } + + // Remove the value + Config.remove(application, Config.FMT_LOCALE); + + // If no value found in the PageContext, check for an + // context initialialization parameter identified by name. + String init = (String) Config.find(pageContext, Config.FMT_LOCALE); + + if (init != null && init.equals("en-US")) { + out.println("Context initialization parameter obtained.\n"); + } else { + out.println("Unexpected value returned when getting Context initialization parameter.
\n"); + out.println("Value: " + init + "
\n"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf new file mode 100644 index 0000000000..8f34c8a415 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf @@ -0,0 +1,22 @@ + + + + + +positiveConfigGetSetRemoveApplicationTest + + + + Expected value returned from APPLICATION_SCOPE
+ +Value removed from APPLICATION_SCOPE
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp new file mode 100644 index 0000000000..132b931785 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + <% + // Set the same variable in diffent scopes, with different values. + Config.set(application, Config.FMT_LOCALE, "applicationScope"); + + // Get the values from the PageContext. The values returned should all be different. + String app = (String) Config.get(application, Config.FMT_LOCALE); + + + if (app.equals("applicationScope")) { + out.println("Expected value returned from APPLICATION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from APPLICATION_SCOPE
\n"); + out.println("Value: " + app + "
\n"); + } + + // Remove the values + Config.remove(application, Config.FMT_LOCALE); + + // All the values returned from another get will be null + String nApp = (String) Config.get(application, Config.FMT_LOCALE); + + if (nApp == null) { + out.println("Value removed from APPLICATION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from APPLICATION_SCOPE. Expected Null.
\n"); + out.println("Value: " + nApp + "
\n"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf new file mode 100644 index 0000000000..7919976873 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf @@ -0,0 +1,34 @@ + + + + + +positiveConfigGetSetRemovePageContextTest + + + + Expected value returned from PAGE_SCOPE
+ +Expected value returned from REQUEST_SCOPE
+ +Expected value returned from SESSION_SCOPE
+ +Expected value returned from APPLICATION_SCOPE
+ +Value removed from PAGE_SCOPE
+ +Value removed from REQUEST_SCOPE
+ +Value removed from SESSION_SCOPE
+ +Value removed from APPLICATION_SCOPE
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp new file mode 100644 index 0000000000..82855d73da --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp @@ -0,0 +1,102 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + <% + // Set the same variable in diffent scopes, with different values. + Config.set(pageContext, Config.FMT_LOCALE, "pageScope", PageContext.PAGE_SCOPE); + Config.set(pageContext, Config.FMT_LOCALE, "requestScope", PageContext.REQUEST_SCOPE); + Config.set(pageContext, Config.FMT_LOCALE, "sessionScope", PageContext.SESSION_SCOPE); + Config.set(pageContext, Config.FMT_LOCALE, "applicationScope", PageContext.APPLICATION_SCOPE); + + // Get the values from the PageContext. The values returned should all be different. + String ipage = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.PAGE_SCOPE); + String req = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.REQUEST_SCOPE); + String ses = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.SESSION_SCOPE); + String app = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.APPLICATION_SCOPE); + + if (ipage.equals("pageScope")) { + out.println("Expected value returned from PAGE_SCOPE
\n"); + } else { + out.println("Unexpected value returned from PAGE_SCOPE
\n"); + out.println("Value: " + ipage + "
\n"); + } + if (req.equals("requestScope")) { + out.println("Expected value returned from REQUEST_SCOPE
\n"); + } else { + out.println("Unexpected value returned from REQUEST_SCOPE
\n"); + out.println("Value: " + req + "
\n"); + } + if (ses.equals("sessionScope")) { + out.println("Expected value returned from SESSION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from SESSION_SCOPE
\n"); + out.println("Value: " + ses + "
\n"); + } + if (app.equals("applicationScope")) { + out.println("Expected value returned from APPLICATION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from APPLICATION_SCOPE
\n"); + out.println("Value: " + app + "
\n"); + } + + // Remove the values + Config.remove(pageContext, Config.FMT_LOCALE, PageContext.PAGE_SCOPE); + Config.remove(pageContext, Config.FMT_LOCALE, PageContext.REQUEST_SCOPE); + Config.remove(pageContext, Config.FMT_LOCALE, PageContext.SESSION_SCOPE); + Config.remove(pageContext, Config.FMT_LOCALE, PageContext.APPLICATION_SCOPE); + + // All the values returned from another get will be null + String nPage = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.PAGE_SCOPE); + String nReq = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.REQUEST_SCOPE); + String nSes = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.SESSION_SCOPE); + String nApp = (String) Config.get(pageContext, Config.FMT_LOCALE, PageContext.APPLICATION_SCOPE); + + if (nPage == null) { + out.println("Value removed from PAGE_SCOPE
\n"); + } else { + out.println("Unexpected value returned from PAGE_SCOPE. Expected Null.
\n"); + out.println("Value: " + nPage + "
\n"); + } + if (nReq == null) { + out.println("Value removed from REQUEST_SCOPE
\n"); + } else { + out.println("Unexpected value returned from REQUEST_SCOPE. Expected Null.
\n"); + out.println("Value: " + nReq + "
\n"); + } + if (nSes == null) { + out.println("Value removed from SESSION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from SESSION_SCOPE. Expected Null.
\n"); + out.println("Value: " + nSes + "
\n"); + } + if (nApp == null) { + out.println("Value removed from APPLICATION_SCOPE
\n"); + } else { + out.println("Unexpected value returned from APPLICATION_SCOPE. Expected Null.
\n"); + out.println("Value: " + nApp + "
\n"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf new file mode 100644 index 0000000000..e72bae6ce8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf @@ -0,0 +1,22 @@ + + + + + +positiveConfigGetSetRemoveRequestTest + + + + Expected value returned from REQUEST_SCOPE
+ +Value removed from REQUEST_SCOPE
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp new file mode 100644 index 0000000000..f8f3a1adff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + <% + // Set the same variable in diffent scopes, with different values. + Config.set(request, Config.FMT_LOCALE, "requestScope"); + + // Get the values from the PageContext. The values returned should all be different. + String req = (String) Config.get(request, Config.FMT_LOCALE); + + + if (req.equals("requestScope")) { + out.println("Expected value returned from REQUEST_SCOPE
\n"); + } else { + out.println("Unexpected value returned from REQUEST_SCOPE
\n"); + out.println("Value: " + req + "
\n"); + } + + // Remove the values + Config.remove(request, Config.FMT_LOCALE); + + // All the values returned from another get will be null + String nReq = (String) Config.get(request, Config.FMT_LOCALE); + + if (nReq == null) { + out.println("Value removed from REQUEST_SCOPE
\n"); + } else { + out.println("Unexpected value returned from REQUEST_SCOPE. Expected Null.
\n"); + out.println("Value: " + nReq + "
\n"); + } + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp new file mode 100644 index 0000000000..57d4f69581 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp @@ -0,0 +1,68 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + <% + // Set the same variable in diffent scopes, with different values. + Config.set(session, Config.FMT_LOCALE, "sessionScope"); + + // Get the values from the PageContext. The values returned should all be different. + String ses = (String) Config.get(session, Config.FMT_LOCALE); + + + if (!ses.equals("sessionScope")) { + out.println("Test FAILED. Unexpected value returned from SESSION_SCOPE
\n"); + out.println("Value: " + ses + "
\n"); + return; + } + + // Remove the values + Config.remove(session, Config.FMT_LOCALE); + + // All the values returned from another get will be null + ses = (String) Config.get(session, Config.FMT_LOCALE); + + if (ses != null) { + out.println("Test FAILED. Unexpected value returned from SESSION_SCOPE. Expected Null.
\n"); + out.println("Value: " + ses + "
\n"); + return; + } + + // Add the value back and invalidate the session + Config.set(session, Config.FMT_LOCALE, "sessionScope"); + session.invalidate(); + + // value must be null + ses = (String) Config.get(session, Config.FMT_LOCALE); + if (ses != null) { + out.println("Test FAILED. Unexpected value returned from SESSION_SCOPE. Execpted 'null'.
\n"); + out.println("Value: " + ses + "
\n"); + return; + } + + // all good, so pass the test + out.println("Test PASSED"); + %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf new file mode 100644 index 0000000000..ee9cfe30aa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf @@ -0,0 +1,34 @@ + + + + + + +positiveConfigStaticMemberTest + + + + + FMT_LOCALE -- OK
+ +FMT_FALLBACK_LOCALE -- OK
+ +FMT_LOCALIZATION_CONTEXT -- OK
+ +FMT_TIME_ZONE -- OK
+ +SQL_DATA_SOURCE -- OK
+ +SQL_MAX_ROWS -- OK
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp new file mode 100644 index 0000000000..c26255a227 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp @@ -0,0 +1,73 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + + <% + if (Config.FMT_LOCALE.equals("jakarta.servlet.jsp.jstl.fmt.locale")) { + out.println("FMT_LOCALE -- OK
\n"); + } else { + out.println("FMT_LOCALE not equal to 'jakarta.servlet.jsp.jstl.fmt.locale'
\n"); + out.println("Value is: " + Config.FMT_LOCALE + "
\n"); + } + + if (Config.FMT_FALLBACK_LOCALE.equals("jakarta.servlet.jsp.jstl.fmt.fallbackLocale")) { + out.println("FMT_FALLBACK_LOCALE -- OK
\n"); + } else { + out.println("FMT_FALLBACKLOCALE not equal to 'jakarta.servlet.jsp.jstl.fmt.fallbackLocale'
\n"); + out.println("Value is: " + Config.FMT_FALLBACK_LOCALE + "
\n"); + } + + if (Config.FMT_LOCALIZATION_CONTEXT.equals("jakarta.servlet.jsp.jstl.fmt.localizationContext")) { + out.println("FMT_LOCALIZATION_CONTEXT -- OK
\n"); + } else { + out.println("FMT_LOCALIZATION_CONTEXT not equal to 'jakarta.servlet.jsp.jstl.fmt.localizationContext'
\n"); + out.println("Value is: " + Config.FMT_LOCALIZATION_CONTEXT + "
\n"); + } + + if (Config.FMT_TIME_ZONE.equals("jakarta.servlet.jsp.jstl.fmt.timeZone")) { + out.println("FMT_TIME_ZONE -- OK
\n"); + } else { + out.println("FMT_TIME_ZONE not equal to 'jakarta.servlet.jsp.jstl.fmt.timeZone'
\n"); + out.println("Value is: " + Config.FMT_TIME_ZONE + "
\n"); + } + + if (Config.SQL_DATA_SOURCE.equals("jakarta.servlet.jsp.jstl.sql.dataSource")) { + out.println("SQL_DATA_SOURCE -- OK
\n"); + } else { + out.println("SQL_DATA_SOURCE not equal to 'jakarta.servlet.jsp.jstl.sql.dataSource'
\n"); + out.println("Value is: " + Config.SQL_DATA_SOURCE + "
\n"); + } + + if (Config.SQL_MAX_ROWS.equals("jakarta.servlet.jsp.jstl.sql.maxRows")) { + out.println("SQL_MAX_ROWS -- OK
\n"); + } else { + out.println("SQL_MAX_ROWS not equal to 'jakarta.servlet.jsp.jstl.sql.maxRows'
\n"); + out.println("Value is: " + Config.SQL_MAX_ROWS + "
\n"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp new file mode 100644 index 0000000000..8572e0be81 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test FAILED. Expected containsIgnoreCase(null, 'sub') to return FALSE. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp new file mode 100644 index 0000000000..85a4f67a0e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:containsIgnoreCase('string', null) to return TRUE. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp new file mode 100644 index 0000000000..d18d446d6b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. The containsIgnoreCase function did not return TRUE + when the 'string' and 'substring' arguments were equal. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp new file mode 100644 index 0000000000..fea70c0438 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + Test PASSED + + + + Test PASSED + + + + Test PASSED + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp new file mode 100644 index 0000000000..152dfc8b66 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test FAILED. Expected contains(null, 'sub') to return FALSE. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp new file mode 100644 index 0000000000..98cbd3695a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:contains('string', null) to return TRUE. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp new file mode 100644 index 0000000000..5a1ba2bc02 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. The contains function did not return TRUE + when the 'string' and 'substring' arguments were equal. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp new file mode 100644 index 0000000000..4f3c44debe --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + Test PASSED + + + + Test FAILED -- fn:contains('soMe StrinG', 'me Str') + + + + Test FAILED -- fn:contains(' string', ' stri') + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp new file mode 100644 index 0000000000..a659c0f98c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:endsWith('string', '') to return TRUE, + but FALSE was returned. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp new file mode 100644 index 0000000000..1242289db0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = null; + pageContext.setAttribute("str", str); +%> + + + Test FAILED. Expected fn:endsWith(null, 'str') to return + FALSE. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp new file mode 100644 index 0000000000..320c91d941 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:endsWith('string', null) to return + TRUE. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp new file mode 100644 index 0000000000..ac21d4ecd1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:endsWith('string', 'string') to return TRUE, + but FALSE was returned. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp new file mode 100644 index 0000000000..9279eb6be2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:startsWith('string', 'ing') to return TRUE, + but FALSE was returned. + + + + + + Test FAILED. Expected fn:startsWith('string', 'inG') to return FALSE, + but TRUE was returned. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp new file mode 100644 index 0000000000..87d3eae809 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = null; + pageContext.setAttribute("nullString", str); +%> + + + Test PASSED + + + Test FAILED. Expected escapeXml(String) to return an empty string + when provided a null value. The actual value returned: ${fn:escapeXml(nullString)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp new file mode 100644 index 0000000000..ec59d55db0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% pageContext.setAttribute("escString", "><&'\""); %> + + + Test PASSED + + + Test FAILED. Expected the return value of escapeXml(String) to be + '><&'"'. Actual value was: ${fn:escapeXml(escString)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp new file mode 100644 index 0000000000..1cf9990b4c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf('string', '') to return + 0. Actual value: ${fn:indexOf('string', '')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp new file mode 100644 index 0000000000..54b170a5ca --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf(null, 'ing') to return + -1. Actual value: ${fn:indexOf(null, 'ing')} + + + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf('', 'InG') to return + 1. Actual value: ${fn:indexOf('', 'ing')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp new file mode 100644 index 0000000000..18b6325852 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf('string', null) to return + 0. Actual value: ${fn:indexOf('string', null)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp new file mode 100644 index 0000000000..f2accd45e2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf('string', 'ing') to return + 3. Actual value: ${fn:indexOf('string', 'ing')} + + + + + + Test PASSED + + + Test FAILED. Expected fn:indexOf('string', 'InG') to return + -1. Actual value: ${fn:indexOf('string', 'ing')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp new file mode 100644 index 0000000000..5290ed9554 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<% + String[] strArray = { "one", "two", "three" }; + pageContext.setAttribute("strArray", strArray); +%> + + + + Test PASSED + + + Test FAILED. Expected fn:join(strArray, '') to return 'onetwothree'. + Received: '${fn:join(strArray, '')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp new file mode 100644 index 0000000000..22ab9be01f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(null, ',') to return ''. + Received: '${fn:join(null, ',')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp new file mode 100644 index 0000000000..131cbc4c5c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<% + String[] strArray = { "one", "two", "three" }; + pageContext.setAttribute("strArray", strArray); +%> + + + + Test PASSED + + + Test FAILED. Expected fn:join(strArray, null) to return 'onetwothree'. + Received: '${fn:join(strArray, null)}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp new file mode 100644 index 0000000000..5c2d2b8e0f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<% + String[] strArray = { "one", "two", "three" }; + pageContext.setAttribute("strArray", strArray); +%> + + + + Test PASSED + + + Test FAILED. Expected fn:join(strArray, '|-|') to return + "one|-|two|-|three". Received: '${fn:join(strArray, '|-|')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp new file mode 100644 index 0000000000..23e311629b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:length('') to return a length of 0. + Received: ${fn:length('')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp new file mode 100644 index 0000000000..3784ea388b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = null; + pageContext.setAttribute("nullString", str); +%> + + + Test PASSED + + + Test FAILED. Expected fn:length(null) to return a length of 0. + Received: ${fn:length(nullString)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp new file mode 100644 index 0000000000..83ad616111 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp @@ -0,0 +1,123 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.util.ArrayList, + java.util.Collection, + java.util.Iterator, + java.util.Map, + java.util.Enumeration, + java.util.Hashtable" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<% + int[] intArray = { 1, 2 }; + Integer[] integerArray = { new Integer(1), new Integer(2), new Integer(3), new Integer(4) }; + + Collection collection = new ArrayList(); + collection.add("ele1"); + collection.add("ele2"); + + Iterator iterator = collection.iterator(); + + Map map = new Hashtable(); + map.put("key1", "value1"); + map.put("key2", "value2"); + map.put("key3", "value3"); + + Enumeration mapEnum = ((Hashtable) map).elements(); + + // stuff all of the above Objects into the pageContext + pageContext.setAttribute("intArray", intArray); + pageContext.setAttribute("integerArray", integerArray); + pageContext.setAttribute("collection", collection); + pageContext.setAttribute("iterator", iterator); + pageContext.setAttribute("map", map); + pageContext.setAttribute("mapEnum", mapEnum); +%> + + + + Test PASSED + + + Test FAILED. Expected fn:length(intArray) to return a length of 2. + Received: ${fn:length(intArray)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length(integerArray) to return a length of 4. + Received: ${fn:length(integerArray)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length(collection) to return a length of 2. + Received: ${fn:length(collection)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length(iterator) to return a length of 2. + Received: ${fn:length(iterator)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length(map) to return a length of 3. + Received: ${fn:length(map)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length(mapEnum) to return a length of 3. + Received: ${fn:length(mapEnum)} + + + + + + Test PASSED + + + Test FAILED. Expected fn:length('string') to return a length of 6. + Received: ${fn:length('string')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp new file mode 100644 index 0000000000..f66bf95575 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg', 'nir', '') to + return 'stg'. Received: '${fn:replace('stnirg', 'nir', '')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp new file mode 100644 index 0000000000..becf2b66ff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg', '', 'rin') to + return 'stnirg'. Received: '${fn:replace('stnirg', '', 'b')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp new file mode 100644 index 0000000000..a3a930ff2b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('', 'a', 'b') to + return ''. Received: '${fn:replace('', 'a', 'b')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp new file mode 100644 index 0000000000..91c0bfc226 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg', 'nir', null) to + return 'stg'. Received: '${fn:replace('stnirg', 'nir', null)}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp new file mode 100644 index 0000000000..304e3771ff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg', null, 'rin') to + return 'stnirg'. Received: '${fn:replace('stnirg', null, 'b')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp new file mode 100644 index 0000000000..44942d348d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace(null, 'a', 'b') to + return ''. Received: '${fn:replace(null, 'a', 'b')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp new file mode 100644 index 0000000000..08b52ea937 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg stnirg', 'nir', 'rin') to + return 'string string'. Received: '${fn:replace('stnirg stnirg', 'nir', 'rin')}' + + + + + + Test PASSED + + + Test FAILED. Expected fn:replace('stnirg', 'gri', 'rin') to + return 'stnirg'. Received: '${fn:replace('stnirg', 'nir', 'rin')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp new file mode 100644 index 0000000000..6ea4990619 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(fn:split('one|two|three', ''), '-') + to return 'one|two|three'. Received: 'fn:join(fn:split('one|two|three', ''), '-')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp new file mode 100644 index 0000000000..827e04b782 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(fn:split('', '|'), '-') + to return ''. Received: '${fn:join(fn:split('', '|'), '-')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp new file mode 100644 index 0000000000..d888a4fcdd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(fn:split('one|two|three', null), '-') + to return 'one|two|three'. Received: 'fn:join(fn:split('one|two|three', null), '-')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp new file mode 100644 index 0000000000..1dd39d94a8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(fn:split(null, '|'), '-') + to return ''. Received: '${fn:join(fn:split(null, '|'), '-')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp new file mode 100644 index 0000000000..540594e98c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:join(fn:split('one|two|three', '|'), '-') + to return 'one-two-three'. Received: '${fn:join(fn:split('one|two|three', '|'), '-')}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp new file mode 100644 index 0000000000..374d58d392 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:startsWith('string', '') to return TRUE, + but FALSE was returned. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp new file mode 100644 index 0000000000..fe78ae8202 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:startsWith('string', null) to return + TRUE. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp new file mode 100644 index 0000000000..b5d2c0fc33 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = null; + pageContext.setAttribute("str", str); +%> + + + Test FAILED. Expected fn:startsWith(null, 'str') to return + FALSE. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp new file mode 100644 index 0000000000..e8e9375b96 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:startsWith('string', 'string') to return TRUE, + but FALSE was returned. + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp new file mode 100644 index 0000000000..aca6a4589b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:startsWith('string', 'str') to return TRUE, + but FALSE was returned. + + + + + + Test FAILED. Expected fn:startsWith('string', 'S') to return FALSE, + but TRUE was returned. + + + Test PASSED + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp new file mode 100644 index 0000000000..d33a47fcb9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringAfter('substring, '') to return + 'substring'. Actual return value: ${fn:substringAfter('substring', '')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp new file mode 100644 index 0000000000..00cd26187c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringAfter(null, 'sub') to return + ''. Actual return value: ${fn:substringAfter(nullObj, 'sub')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp new file mode 100644 index 0000000000..1c729620f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringAfter('substring, null) to return + 'substring'. Actual return value: ${fn:substringAfter('substring', null)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp new file mode 100644 index 0000000000..90353bff22 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringAfter('substring', 'sub') to return + 'string'. Actual return value: ${fn:substringAfter('substring', 'sub')} + + + + + + Test PASSED + + + Test FAILED. Expected fn:substringAfter('substring', 'Sub') to return + ''. Actual return value: ${fn:substringAfter('substring', 'Sub')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp new file mode 100644 index 0000000000..7860cd804e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + + Test PASSED + + + Test FAILED. Expected fn:substringBefore(string1, 'first') to return + 'This is'. Actual return value: ${fn:substringBefore(string1, 'first')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp new file mode 100644 index 0000000000..923b54d12d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringBefore(null, 'sub') to return + ''. Actual return value: ${fn:substringBefore(null, 'sub')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp new file mode 100644 index 0000000000..1a051de0cb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringBefore('substring', null) to return + ''. Actual return value: ${fn:substringBefore('substring', null)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp new file mode 100644 index 0000000000..79e38d26be --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substringBefore('substring', 'string') to return + 'sub'. Actual return value: ${fn:substringBefore('substring', 'sub')} + + + + + + Test PASSED + + + Test FAILED. Expected fn:substringBefore('substring', 'String') to return + ''. Actual return value: ${fn:substringBefore('substring', 'String')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp new file mode 100644 index 0000000000..8a34be4751 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('string', 7, 6) to return ''. + Received: '${fn:substring('string', 7, 6)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp new file mode 100644 index 0000000000..49d0502a72 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('SsubstringG', 1, 12) to return + 'substringG'. Actual return was: ${fn:substring('SsubstringG', -1, 10)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp new file mode 100644 index 0000000000..2fbf19a61e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('SsubstringG', 12, 11) to return + ''. Actual return was: ${fn:substring('SsubstringG', 12, 11)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp new file mode 100644 index 0000000000..613ea03fa9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('SsubstringG', -1, 10) to return + 'Ssubstring'. Actual return was: ${fn:substring('SsubstringG', -1, 10)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp new file mode 100644 index 0000000000..bc85ac836d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('SsubstringG', 1, -1) to return + 'substringG'. Actual return was: ${fn:substring('SsubstringG', 1, -1)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp new file mode 100644 index 0000000000..7cd729e784 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = null; + pageContext.setAttribute("str", str); +%> + + + Test PASSED + + + Test FAILED. Expected fn:substring(null, 1, 10) to return + ''. Actual return was: ${fn:substring(str, 1, 10)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp new file mode 100644 index 0000000000..63c1d6f60b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:substring('SsubstringG', 1, 10) to return + 'substring'. Actual return was: ${fn:substring('SsubstringG', 1, 10)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp new file mode 100644 index 0000000000..b87e6ee278 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected the result of fn:toLowerCase(null) to be + ''. Actual result received: ${fn:toLowerCase(null)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp new file mode 100644 index 0000000000..0d6c6e07ea --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected the result of fn:toLowerCase('lOwER') to be + 'lower'. Actual result received: ${fn:toLowerCase('lOwER')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp new file mode 100644 index 0000000000..f3fcb7f7b1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected the result of fn:toUpperCase(null) to be + ''. Actual result received: ${fn:toUpperCase(null)} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp new file mode 100644 index 0000000000..dd1d84a648 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected the result of fn:toLowerCase('uPpEr') to be + 'UPPER'. Actual result received: ${fn:toLowerCase('uPpEr')} + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp new file mode 100644 index 0000000000..43df5472e6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + Test PASSED + + + Test FAILED. Expected fn:trim(null) to return + ''. Actual result: '${fn:trim(null)}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp new file mode 100644 index 0000000000..2fdfe6b17c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="fn" uri="jakarta.tags.functions" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<% + String str = " \t trimmed string \n"; + pageContext.setAttribute("str", str); +%> + + + Test PASSED + + + Test FAILED. Expected fn:trim(' \t trimmed string \n') to return + 'trimmed string'. Actual result: '${fn:trim(str)}' + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml new file mode 100644 index 0000000000..81bea40f98 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml @@ -0,0 +1,34 @@ + + + + + EL/TLV/URI Tag Library TCK Tests for JSTL + jstl_etu_func_web + + jakarta.servlet.jsp.jstl.fmt.locale + en-US + + + simpleParam + Context Parameter Value Obtained + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml new file mode 100644 index 0000000000..069e002a62 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml @@ -0,0 +1,26 @@ + + + + + EL/TLV/URI Tag Library TCK Tests for JSTL + jstl_etu_tlv_perm_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp new file mode 100644 index 0000000000..b3cf9d868f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/permitted" %> + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp new file mode 100644 index 0000000000..d20822404b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="util" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/permitted" %> + + + Test PASSED
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml new file mode 100644 index 0000000000..dd8d43957d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml @@ -0,0 +1,26 @@ + + + + + EL/TLV/URI Tag Library TCK Tests for JSTL + jstl_etu_tlv_scrfree_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp new file mode 100644 index 0000000000..13114dcfb0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/nodecl" %> + + + <%! String test = "Shouldn't have translated"; %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp new file mode 100644 index 0000000000..dd09e7c2b3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/noexpr" %> + + + <%= new String("Shouldn't have translated.").toString() %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp new file mode 100644 index 0000000000..d52a7f2d33 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/nortexpr" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp new file mode 100644 index 0000000000..ecb548671b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/noscr" %> + + + <% String test = "Shouldn't have translated"; %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp new file mode 100644 index 0000000000..fa134ef3ee --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/nodecl" %> + + + <% + out.println("Output from a scriptlet.
"); + %> + <%= new String("Output from an expression.
").toString() %> +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp new file mode 100644 index 0000000000..339c475dc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/noexpr" %> + + + <% + out.println("Output from a scriptlet.
"); + %> + <%! int i = 0; %> + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp new file mode 100644 index 0000000000..0e9b8020ef --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/nortexpr" %> + + + <%= new String("Output from an Expression.
").toString() %> + <%! int i = 0; %> + <% + out.println("Output from a scriptlet.
"); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp new file mode 100644 index 0000000000..ff0ea174cf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/noscr" %> + + + <%= new String("Output from an Expression.
").toString() %> + <%! int i = 0; %> +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml new file mode 100644 index 0000000000..58760347f0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml @@ -0,0 +1,34 @@ + + + + + EL/TLV/URI Tag Library TCK Tests for JSTL + jstl_etu_uri_web + + jakarta.servlet.jsp.jstl.fmt.locale + en-US + + + simpleParam + Context Parameter Value Obtained + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp new file mode 100644 index 0000000000..1329625425 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveJSTLURITest + + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml new file mode 100644 index 0000000000..5eee4cd17d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_fmtdate_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp new file mode 100644 index 0000000000..3395aaa49b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf new file mode 100644 index 0000000000..7026629d7b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf @@ -0,0 +1,73 @@ + + + + + + + + +positiveFDDateStyleTest + + + +
'type' not specified -- dateStyle should be applied
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ 12/26/97
+ 12/26/97
+ Dec 26, 1997
+ Dec 26, 1997
+ December 26, 1997
+ December 26, 1997
+ Friday, December 26, 1997
+ Friday, December 26, 1997
+ +
'type' set to 'date' -- dateStyle should be applied
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ 12/26/97
+ 12/26/97
+ Dec 26, 1997
+ Dec 26, 1997
+ December 26, 1997
+ December 26, 1997
+ Friday, December 26, 1997
+ Friday, December 26, 1997
+ +
'type' set to 'time' -- dateStyle should not be applied
10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ +
'type' set to 'both' -- dateStyle should be applied
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ 12/26/97, 10:11:34 PM
+ 12/26/97, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ December 26, 1997, 10:11:34 PM
+ December 26, 1997, 10:11:34 PM
+ Friday, December 26, 1997, 10:11:34 PM
+ Friday, December 26, 1997, 10:11:34 PM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp new file mode 100644 index 0000000000..eef743a25e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp @@ -0,0 +1,136 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + +
'type' not specified -- dateStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'date' -- dateStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'time' -- dateStyle should not be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'both' -- dateStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf new file mode 100644 index 0000000000..31ec9e5cee --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf @@ -0,0 +1,19 @@ + + + + + + + +positiveFDFallbackLocaleTest + + + + Dec 26, 1997 + 10:11:34 PM + Dec 26, 1997, 10:11:34 PM + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp new file mode 100644 index 0000000000..74df229bd5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf new file mode 100644 index 0000000000..1459ca8d57 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveFDLocalizationContextTest + + + + Dec 26, 1997 + 10:11:34 PM + Dec 26, 1997, 10:11:34 PM + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp new file mode 100644 index 0000000000..03a35f5fcc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf new file mode 100644 index 0000000000..fb5c225cc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf @@ -0,0 +1,20 @@ + + + + + + + + +positiveFDPatternTest + + + + 1997.12.26 AD at 22:11:34 EST
+ 1997.12.26 AD at 22:11:34 EST
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp new file mode 100644 index 0000000000..049da3d6cb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf new file mode 100644 index 0000000000..8d349a90bf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf @@ -0,0 +1,36 @@ + + + + + + + + +positiveFDScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp new file mode 100644 index 0000000000..c0827ac438 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(102142631861L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf new file mode 100644 index 0000000000..4071fd88fc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf @@ -0,0 +1,73 @@ + + + + + + + + +positiveFDTimeStyleTest + + + +
'type' not specified -- timeStyle should not be applied
Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ +
'type' set to 'date' -- timeStyle should not be applied
Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ Dec 26, 1997
+ +
'type' set to 'time' -- timeStyle should be applied
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11 PM
+ 10:11 PM
+ 10:11:34 PM
+ 10:11:34 PM
+ 10:11:34 PM EST
+ 10:11:34 PM EST
+ 10:11:34 PM Eastern Standard Time
+ 10:11:34 PM Eastern Standard Time
+ +
'type' set to 'both' -- timeStyle should be applied
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11 PM
+ Dec 26, 1997, 10:11 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM EST
+ Dec 26, 1997, 10:11:34 PM EST
+ Dec 26, 1997, 10:11:34 PM Eastern Standard Time
+ Dec 26, 1997, 10:11:34 PM Eastern Standard Time
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp new file mode 100644 index 0000000000..c7e24396e1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp @@ -0,0 +1,136 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + +
'type' not specified -- timeStyle should not be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'date' -- timeStyle should not be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'time' -- timeStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'both' -- timeStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf new file mode 100644 index 0000000000..fc9ba91312 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf @@ -0,0 +1,19 @@ + + + + + + + +positiveFDTimeZoneNullEmpytTest + + + + Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp new file mode 100644 index 0000000000..6aad2672b6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf new file mode 100644 index 0000000000..d44d68f338 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf @@ -0,0 +1,40 @@ + + + + + + + +positiveFDTimeZonePrecedenceTest + + + +
TimeZone attribute specified with a value of PST:
+ Wrapped by <fmt:timeZone> action with MST. Time should be 7:11:34 PM:
+ + Dec 26, 1997, 7:11:34 PM
+ + + Not wrapped. Page has a time zone of EST. Time should be 7:11:34 PM
+ Dec 26, 1997, 7:11:34 PM
+ +
No TimeZone attribute specified:
+ Wrapped by <fmt:timeZone> action with MST. Time should be 8:11:34 PM:
+ + Dec 26, 1997, 8:11:34 PM
+ + + Not wrapped. Page has a time zone of EST. Time should be 10:11:34 PM
+ Dec 26, 1997, 10:11:34 PM
+
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp new file mode 100644 index 0000000000..c80158367f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp @@ -0,0 +1,56 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + +
TimeZone attribute specified with a value of PST:
+ Wrapped by <fmt:timeZone> action with MST. Time should be 7:11:34 PM:
+ +
+
+ + Not wrapped. Page has a time zone of EST. Time should be 7:11:34 PM
+
+ +
No TimeZone attribute specified:
+ Wrapped by <fmt:timeZone> action with MST. Time should be 8:11:34 PM:
+ +
+
+ + Not wrapped. Page has a time zone of EST. Time should be 10:11:34 PM
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf new file mode 100644 index 0000000000..e7d63d5c80 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveFDTimeZoneTest + + + +
Page is using EST for the timezone. The formatting action will use PST. Value should be minus 3 hours.
+ No timeZone attribute: Dec 26, 1997, 10:11:34 PM
+ Dec 26, 1997, 7:11:34 PM
+ Dec 26, 1997, 7:11:34 PM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp new file mode 100644 index 0000000000..4bb0384844 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date,java.util.TimeZone" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + pageContext.setAttribute("tz", TimeZone.getTimeZone("PST")); + %> + + + + +
Page is using EST for the timezone. The formatting action will use PST. Value should be minus 3 hours.
+ No timeZone attribute:
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf new file mode 100644 index 0000000000..e6cc8f90fa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf @@ -0,0 +1,28 @@ + + + + + + + + +positiveFDTypeTest + + + + date: Dec 26, 1997
+ date: Dec 26, 1997
+ date: Dec 26, 1997
+ time: 10:11:34 PM
+ time: 10:11:34 PM
+ both: Dec 26, 1997, 10:11:34 PM
+ both: Dec 26, 1997, 10:11:34 PM
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp new file mode 100644 index 0000000000..dc4706aab7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + date:
+ date:
+ date:
+ time:
+ time:
+ both:
+ both:
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf new file mode 100644 index 0000000000..9db4fef9d2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positiveFDValueNullEmptyTest + + + + + + + + Scoped variable properly removed.
+ + + + Scoped variable properly removed.
+ + + + Scoped variable not removed.
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp new file mode 100644 index 0000000000..f5921feb85 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + +
+ + + +
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf new file mode 100644 index 0000000000..fda943b09f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf @@ -0,0 +1,20 @@ + + + + + + + + +positiveFDValueTest + + + + + Dec 26, 1997
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp new file mode 100644 index 0000000000..cdb4105aa0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + %> + + + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf new file mode 100644 index 0000000000..3b1a4c3031 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveFDVarTest + + + + + + rDate is of type java.lang.String
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp new file mode 100644 index 0000000000..ae0578bb01 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(102142631861L); + pageContext.setAttribute("dte", date); + %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml new file mode 100644 index 0000000000..3e681fab19 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_fmtnum_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp new file mode 100644 index 0000000000..67c2b72f60 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf new file mode 100644 index 0000000000..37ca11683a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf @@ -0,0 +1,24 @@ + + + + + + + +negativeFNUnableToParseValueTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause Exception java.lang.IllegalArgumentException was of the expected type.
+The expected Exception text was found in the Exception message! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp new file mode 100644 index 0000000000..407ccacc6f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf new file mode 100644 index 0000000000..db58405933 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf @@ -0,0 +1,17 @@ + + + + + + +positiveFNBodyValueTest + + + + 123,456,789 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp new file mode 100644 index 0000000000..75db10e99c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + 123456789 + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf new file mode 100644 index 0000000000..1a7d42eaea --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf @@ -0,0 +1,27 @@ + + + + + + + +positiveFNCodeSymbolTest + + + + + + + Value properly formatted as a currency. + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp new file mode 100644 index 0000000000..56a172c18b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + <% + String val = (String) pageContext.getAttribute("rtRes"); + if (val.equals("$1,234.00")) { + out.println("Value properly formatted as a currency."); + } else { + out.println("Value not properly formatted as a currency."); + out.println("Expected: $1,234.00"); + out.println("Received: " + val); + } + %> + + + <% + String val = (String) pageContext.getAttribute("rtRes"); + if (val.equals("@1,234.00")) { + out.println("Value properly formatted as a currency."); + } else { + out.println("Value not properly formatted as a currency."); + out.println("Expected: @1,234.00"); + out.println("Received: " + val); + } + %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf new file mode 100644 index 0000000000..66d1e73ff7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positiveFNCurrencyCodeTest + + + + 123,456,789 + 123,456,789 + 12,345,678,900% + + + + + Value properly formatted as a currency. + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp new file mode 100644 index 0000000000..dbc1d90bbc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + <% + String val = (String) pageContext.getAttribute("rtRes"); + if (val.equals("$123,456,789.00")) { + out.println("Value properly formatted as a currency."); + } else { + out.println("Value not properly formatted as a currency."); + out.println("Expected: $123,456,789.00"); + out.println("Received: " + val); + } + %> + + + <% + String val = (String) pageContext.getAttribute("rtRes"); + if (val.equals("USD123,456,789.00")) { + out.println("Value properly formatted as a currency."); + } else { + out.println("Value not properly formatted as a currency."); + out.println("Expected: USD123,456,789.00"); + out.println("Received: " + val); + } + %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf new file mode 100644 index 0000000000..f557ebe040 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positiveFNCurrencySymbolTest + + + + 123,456 + 123,456 + 12,345,600% + @123,456.00 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp new file mode 100644 index 0000000000..3342ad0dac --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf new file mode 100644 index 0000000000..95d91ca382 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveFNFallbackLocaleTest + + + + 1,234 + $1,234.00 + 123,400% + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp new file mode 100644 index 0000000000..b9d9580645 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf new file mode 100644 index 0000000000..e4bcec225d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf @@ -0,0 +1,23 @@ + + + + + + +positiveFNGroupingUsedTest + + + + 123,456,789 + 123,456,789 + 123456789 + $123456789.00 + $123,456,789.00 + 12345678900% + 12,345,678,900% + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp new file mode 100644 index 0000000000..808de18249 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf new file mode 100644 index 0000000000..2394e13b65 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveFNLocalizationContextTest + + + + 1,234 + $1,234.00 + 123,400% + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp new file mode 100644 index 0000000000..9ac14b9e22 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf new file mode 100644 index 0000000000..a04cbacb0e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveFNMaxFracDigitsTest + + + + 9.12346 + 53.11111% + $9.12346 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp new file mode 100644 index 0000000000..4a22443b81 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf new file mode 100644 index 0000000000..09ddb384e0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveFNMaxIntDigitsTest + + + + 56,789.1 + 78,910% + $56,789.10 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp new file mode 100644 index 0000000000..cda2cc5270 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf new file mode 100644 index 0000000000..46d1a8089f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveFNMinFracDigitsTest + + + + 1,234.100000 + 53.000000% + $1,234.100000 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp new file mode 100644 index 0000000000..51eccbb55d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf new file mode 100644 index 0000000000..d1efa0e9c1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveFNMinIntDigitsTest + + + + + 001,234.1 + 000,053% + $001,234.10 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp new file mode 100644 index 0000000000..59a18bfc59 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf new file mode 100644 index 0000000000..765c8d9f39 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveFNPatternTest + + + + + 1.234E3 + 1.234E3 + 1.234E3 + 1.234E3 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp new file mode 100644 index 0000000000..3a0e7da335 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf new file mode 100644 index 0000000000..f5bb3edf1e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf @@ -0,0 +1,33 @@ + + + + + + + +positiveFNScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp new file mode 100644 index 0000000000..d9049e6067 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf new file mode 100644 index 0000000000..63599ab948 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf @@ -0,0 +1,25 @@ + + + + + + + +positiveFNTypeTest + + + + 123,456 + 123,456 + 123,456 + $123,456.00 + $123,456.00 + 12,345,600% + 12,345,600% + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp new file mode 100644 index 0000000000..350eb22173 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf new file mode 100644 index 0000000000..080747ffaa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf @@ -0,0 +1,25 @@ + + + + + + +positiveFNValueNullEmptyTest + + + + + + + + + + + Scoped variable removed + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp new file mode 100644 index 0000000000..d1c8845b11 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf new file mode 100644 index 0000000000..871a091ff6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveFNValueTest + + + + + 123,456 + 123,456 + 123,456 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp new file mode 100644 index 0000000000..e41ee17864 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + <% + Integer number = new Integer("123456"); + pageContext.setAttribute("Num", number); + %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf new file mode 100644 index 0000000000..5a851da615 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positiveFNVarTest + + + + + + rVar is of type java.lang.String
+ 1,234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp new file mode 100644 index 0000000000..31a2ff776c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml new file mode 100644 index 0000000000..f9a7c2a541 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_locctx_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf new file mode 100644 index 0000000000..34809322da --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf @@ -0,0 +1,23 @@ + + + + + + + + +positiveFormatLocalizationContextBrowserLocaleTest + + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp new file mode 100644 index 0000000000..df669a500d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf new file mode 100644 index 0000000000..a3ff75832f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf @@ -0,0 +1,29 @@ + + + + + + + + +positiveFormatLocalizationContextBundleTest + + + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp new file mode 100644 index 0000000000..3fc092c8f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf new file mode 100644 index 0000000000..4862a07aa9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf @@ -0,0 +1,23 @@ + + + + + + + + +positiveFormatLocalizationContextI18NTest + + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp new file mode 100644 index 0000000000..97e6abe04c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf new file mode 100644 index 0000000000..029e0fbe82 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf @@ -0,0 +1,23 @@ + + + + + + + + +positiveFormatLocalizationContextLocaleTest + + + + + Nov 21, 2000, 3:45:02 AM + 1234 + 1,234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp new file mode 100644 index 0000000000..a53607e6c8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml new file mode 100644 index 0000000000..1d4ff3aeb9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_psdate_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp new file mode 100644 index 0000000000..ac4848f246 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf new file mode 100644 index 0000000000..d54d99a49f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf @@ -0,0 +1,24 @@ + + + + + + + +negativePDUnableToParseValueTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp new file mode 100644 index 0000000000..e31095a7df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf new file mode 100644 index 0000000000..566cf7c258 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf @@ -0,0 +1,19 @@ + + + + + + +positivePDBodyValueTest + + + + + Nov 21, 2000, 3:45:02 AM + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp new file mode 100644 index 0000000000..54f185e856 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + Nov 21, 2000, 3:45:02 AM + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf new file mode 100644 index 0000000000..254d6b237a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf @@ -0,0 +1,73 @@ + + + + + + + +positivePDDateStyleTest + + + +
'type' not specified -- dateStyle should be applied.
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ +
'type' set to 'date' -- dateStyle should be applied.
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ +
'type' set to 'time' -- dateStyle should not be applied. If applied, a parse exception would occur.
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ +
'type' set to 'both' -- dateStyle should be applied
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp new file mode 100644 index 0000000000..75da0b07a7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp @@ -0,0 +1,112 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + +
'type' not specified -- dateStyle should be applied.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'date' -- dateStyle should be applied.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'time' -- dateStyle should not be applied. If applied, a parse exception would occur.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'both' -- dateStyle should be applied
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf new file mode 100644 index 0000000000..6f81de4e1d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf @@ -0,0 +1,24 @@ + + + + + + + + +positivePDFallbackLocaleTest + + + + + + + Nov 21, 2000
+ 3:45:02 AM
+ Nov 21, 2000, 3:45:02 AM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp new file mode 100644 index 0000000000..01d01f36fa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + + + + + + + + + + +
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf new file mode 100644 index 0000000000..45eae40ce6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf @@ -0,0 +1,25 @@ + + + + + + + +positivePDLocalizationContextTest + + + + + + + Nov 21, 2000
+ 3:45:02 AM
+ Nov 21, 2000, 3:45:02 AM
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp new file mode 100644 index 0000000000..c3b4290584 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + +
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf new file mode 100644 index 0000000000..b6e82cc926 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf @@ -0,0 +1,21 @@ + + + + + + +positivePDParseLocaleNullEmptyTest + + + + + + Nov 21, 2000
+ Nov 21, 2000
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp new file mode 100644 index 0000000000..174ff1d7e2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + +
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf new file mode 100644 index 0000000000..3f5f066edb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf @@ -0,0 +1,24 @@ + + + + + + + + +positivePDParseLocaleTest + + + + + Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp new file mode 100644 index 0000000000..4cc0c4ee27 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + pageContext.setAttribute("loc", new Locale("en", "US")); + %> + + + + + + +
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf new file mode 100644 index 0000000000..80f0ef87b4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positivePDPatternTest + + + + + + 2000.11.21 AD at 03:45:02 EST
+ 2000.11.21 AD at 03:45:02 EST
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp new file mode 100644 index 0000000000..c75e3f048a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + + + + + + + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf new file mode 100644 index 0000000000..394a73fbff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf @@ -0,0 +1,35 @@ + + + + + + + +positivePDScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp new file mode 100644 index 0000000000..7b2fec52a6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf new file mode 100644 index 0000000000..6c0a4a37c9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf @@ -0,0 +1,73 @@ + + + + + + + +positivePDTimeStyleTest + + + +
'type' not specified -- timeStyle should not be applied. If it is, a parse exception would occur.
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ +
'type' set to 'date' -- timeStyle should not be applied. If it is, a parse exception would occur.
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ Tue Nov 21 00:00:00 EST 2000
+ +
'type' set to 'time' -- timeStyle should be applied.
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:00 EST 1970
+ Thu Jan 01 03:45:00 EST 1970
+ Thu Jan 01 03:45:02 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ Thu Jan 01 03:45:03 EST 1970
+ +
'type' set to 'both' -- timeStyle should be applied.
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:00 EST 2000
+ Tue Nov 21 03:45:00 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ Tue Nov 21 03:45:02 EST 2000
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp new file mode 100644 index 0000000000..d34d66c58c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp @@ -0,0 +1,112 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + +
'type' not specified -- timeStyle should not be applied. If it is, a parse exception would occur.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'date' -- timeStyle should not be applied. If it is, a parse exception would occur.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'time' -- timeStyle should be applied.
+
+
+
+
+
+
+
+
+
+
+
+
+ +
'type' set to 'both' -- timeStyle should be applied.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf new file mode 100644 index 0000000000..236865393a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positivePDTimeZoneNullEmpytTest + + + + + + + Nov 21, 2000, 5:45 AM
+ Nov 21, 2000, 5:45 AM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp new file mode 100644 index 0000000000..dbecf3d3e2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf new file mode 100644 index 0000000000..9d16997402 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf @@ -0,0 +1,45 @@ + + + + + + + + +positivePDTimeZonePrecedenceTest + + + +
TimeZone attribute specified with a value of PST:
+ Wrapped by <fmt:timeZone> action with MST. Time should be offset by 3 hours:
+ + + + Nov 21, 2000, 6:45 AM
+ + Not wrapped. Page has a time zone of EST, timeZone attribute specified. Time should be offset by 3 hours:
+
+ Nov 21, 2000, 6:45 AM
+ +
No TimeZone attribute specified:
+ Wrapped by <fmt:timeZone> action with MST. Time should be offset by 2 hours:
+ +
+ + Nov 21, 2000, 5:45 AM
+ + Not wrapped. Page has a time zone of EST. Time should not be offset:
+
+ Nov 21, 2000, 3:45 AM
+
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp new file mode 100644 index 0000000000..53d42ddec1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + + + + + +
TimeZone attribute specified with a value of PST:
+ Wrapped by <fmt:timeZone> action with MST. Time should be offset by 3 hours:
+ + + +
+ + Not wrapped. Page has a time zone of EST, timeZone attribute specified. Time should be offset by 3 hours:
+
+
+ +
No TimeZone attribute specified:
+ Wrapped by <fmt:timeZone> action with MST. Time should be offset by 2 hours:
+ +
+
+
+ + Not wrapped. Page has a time zone of EST. Time should not be offset:
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf new file mode 100644 index 0000000000..db3c818cd4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf @@ -0,0 +1,26 @@ + + + + + + + + +positivePDTimeZoneTest + + + +
Page is using EST for the timezone. The formatting action will use PST. Value should be offset 3 hours.
+ + + + No timeZone attribute: Nov 21, 2000, 3:45 AM
+ Nov 21, 2000, 6:45 AM
+ Nov 21, 2000, 6:45 AM
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp new file mode 100644 index 0000000000..346c161116 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.TimeZone" %> + + <% + pageContext.setAttribute("tz", TimeZone.getTimeZone("PST")); + %> + + + + + +
Page is using EST for the timezone. The formatting action will use PST. Value should be offset 3 hours.
+ + + + No timeZone attribute:
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf new file mode 100644 index 0000000000..85240eb399 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positivePDTypeTest + + + + + + + + + + + date: Nov 21, 2000
+ date: Nov 21, 2000
+ date: Nov 21, 2000
+ time: 3:45:02 AM
+ time: 3:45:02 AM
+ both: Nov 21, 2000, 3:45:02 AM
+ both: Nov 21, 2000, 3:45:02 AM
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp new file mode 100644 index 0000000000..59f6b6307f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp @@ -0,0 +1,56 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + date:
+ date:
+ date:
+ time:
+ time:
+ both:
+ both:
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf new file mode 100644 index 0000000000..3377535a38 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf @@ -0,0 +1,24 @@ + + + + + + + +positivePDValueNullEmptyTest + + + + + + pvalue not found in specified scope:session.
+ + + + pvalue not found in specified scope:application.
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp new file mode 100644 index 0000000000..d06a2e8f18 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf new file mode 100644 index 0000000000..f17f64e824 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positivePDValueTest + + + + + + Nov 21, 2000 + Nov 21, 2000 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp new file mode 100644 index 0000000000..cb7415fe0d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf new file mode 100644 index 0000000000..ae202d2b78 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positivePDVarTest + + + + + rDate is of type java.util.Date
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp new file mode 100644 index 0000000000..0c0ef1c6f7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml new file mode 100644 index 0000000000..2f802ee366 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_psnum_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp new file mode 100644 index 0000000000..1df608ed2f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf new file mode 100644 index 0000000000..caee1ef7e2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf @@ -0,0 +1,24 @@ + + + + + + + +negativePNUnableToParseValueTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp new file mode 100644 index 0000000000..e5b2b1bd7f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf new file mode 100644 index 0000000000..4abdd2a052 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf @@ -0,0 +1,17 @@ + + + + + + +positivePNBodyValueTest + + + + 1234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp new file mode 100644 index 0000000000..5d55dc4e2d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + 1,234 + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf new file mode 100644 index 0000000000..4ad340d699 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf @@ -0,0 +1,18 @@ + + + + + + +positivePNFallbackLocaleTest + + + + 1234 + 1234 + 0.015 + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp new file mode 100644 index 0000000000..8d3654ec2e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf new file mode 100644 index 0000000000..dbdfd589d4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf @@ -0,0 +1,23 @@ + + + + + + +positivePNIntegerOnlyTest + + + + Number: 1234.56 + Number: 1234.56 + Number int only: 1234 + Currency int only: 1234 + Currency: 1234.56 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp new file mode 100644 index 0000000000..4fef259d9b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Number: + Number: + Number int only: + Currency int only: + Currency: + <%-- + *** Commented out due to J2SE BugID: 4663985 *** + Percent int only: + Percent: + --%> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf new file mode 100644 index 0000000000..a0b1b7bf4a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf @@ -0,0 +1,20 @@ + + + + + + +positivePNLocalizationContextTest + + + + 1234 + 1234 + 0.015 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp new file mode 100644 index 0000000000..22949067a2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf new file mode 100644 index 0000000000..583bd12cf4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf @@ -0,0 +1,17 @@ + + + + + + +positivePNParseLocaleNullEmptyTest + + + + 1234 + 1234 + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp new file mode 100644 index 0000000000..e947a03593 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf new file mode 100644 index 0000000000..5c1fee48e8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf @@ -0,0 +1,24 @@ + + + + + + + + +positivePNParseLocaleTest + + + + Number: 1234 + Number: 1234 + Currency: 1234 + Percent: 0.015 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp new file mode 100644 index 0000000000..e4e6a736ef --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + pageContext.setAttribute("loc", new Locale("en","US")); + %> + + + + + Number: + Number: + Currency: + Percent: + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf new file mode 100644 index 0000000000..0210fb4ba1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positivePNPatternTest + + + + Number: 12345 + Number: 12345 + Number: 12345 + Currency: 12.5 + Percent: 0.125 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp new file mode 100644 index 0000000000..89c14d8603 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + Number: + Number: + Number: + Currency: + Percent: + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf new file mode 100644 index 0000000000..7948444e4f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf @@ -0,0 +1,35 @@ + + + + + + + +positivePNScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp new file mode 100644 index 0000000000..7e3e7eb2a7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf new file mode 100644 index 0000000000..0a3d6c7f93 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf @@ -0,0 +1,25 @@ + + + + + + + +positivePNTypeTest + + + + Number: 1234
+ Number: 1234 + Number: 1234 + Currency: 1234 + Currency: 1234 + Percent: 0.015 + Percent: 0.015 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp new file mode 100644 index 0000000000..2986166969 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + Number:
+ Number: + Number: + Currency: + Currency: + Percent: + Percent: +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf new file mode 100644 index 0000000000..076319bd7a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf @@ -0,0 +1,26 @@ + + + + + + + +positivePNValueNullEmptyTest + + + + + + svar not found in specified scope:session.
+ + + + + svar not found in specified scope:application.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp new file mode 100644 index 0000000000..dbc9bd6327 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf new file mode 100644 index 0000000000..4168cee189 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positivePNValueTest + + + + 1234 + 1234 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp new file mode 100644 index 0000000000..d106c32547 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf new file mode 100644 index 0000000000..4eb85496af --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf @@ -0,0 +1,17 @@ + + + + + + +positivePNVarTest + + + + + reNum is of type java.lang.Number
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp new file mode 100644 index 0000000000..04bb4ca306 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml new file mode 100644 index 0000000000..122158e87d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_stz_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf new file mode 100644 index 0000000000..57ee2527ed --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf @@ -0,0 +1,38 @@ + + + + + + + +positiveTimezoneAttrScopeTest + + + + + jakarta.servlet.jsp.jstl.fmt.timeZone found in page scope.
+ + + + jakarta.servlet.jsp.jstl.fmt.timeZone found in page scope.
+ + + + jakarta.servlet.jsp.jstl.fmt.timeZone found in request scope.
+ + + + jakarta.servlet.jsp.jstl.fmt.timeZone found in session scope.
+ + + + jakarta.servlet.jsp.jstl.fmt.timeZone found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp new file mode 100644 index 0000000000..cbc3f25f80 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf new file mode 100644 index 0000000000..b67edf626a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf @@ -0,0 +1,32 @@ + + + + + + +positiveTimezoneScopeTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp new file mode 100644 index 0000000000..ae6a8854aa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf new file mode 100644 index 0000000000..d864f17967 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveTimezoneSetAttrTest + + + + + + rtz is of type java.util.TimeZone
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp new file mode 100644 index 0000000000..b10f0112f7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf new file mode 100644 index 0000000000..3ad2afa15e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveTimezoneValueNullEmptyTest + + + + + Saturday, December 27, 1997 at 3:11:34 AM Greenwich Mean Time + + + Saturday, December 27, 1997 at 3:11:34 AM Greenwich Mean Time + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp new file mode 100644 index 0000000000..88a889a106 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf new file mode 100644 index 0000000000..c20cac1a6d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf @@ -0,0 +1,27 @@ + + + + + + + + +positiveTimezoneValueTest + + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Saturday, December 27, 1997 at 2:11:34 AM GMT-01:00 + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp new file mode 100644 index 0000000000..4ea4deb562 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.TimeZone,java.util.Date" %> + + <% + TimeZone tz = TimeZone.getTimeZone("PST"); + pageContext.setAttribute("tz", tz); + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf new file mode 100644 index 0000000000..701228f451 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveTimezoneVarTest + + + + + rtz is of type java.util.TimeZone
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp new file mode 100644 index 0000000000..bc9e5eb5e0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml new file mode 100644 index 0000000000..46d02eaecd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_tz_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf new file mode 100644 index 0000000000..4c2bc63ddb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveTimezoneValueNullEmptyTest + + + + + Saturday, December 27, 1997 at 3:11:34 AM Greenwich Mean Time + + + Saturday, December 27, 1997 at 3:11:34 AM Greenwich Mean Time + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp new file mode 100644 index 0000000000..52780e1aaa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Date" %> + + <% + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf new file mode 100644 index 0000000000..38281dc199 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf @@ -0,0 +1,28 @@ + + + + + + + + +positiveTimezoneValueTest + + + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + + Friday, December 26, 1997 at 7:11:34 PM Pacific Standard Time + + + Saturday, December 27, 1997 at 2:11:34 AM GMT-01:00 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp new file mode 100644 index 0000000000..51c45f35c9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.TimeZone,java.util.Date" %> + + <% + TimeZone tz = TimeZone.getTimeZone("PST"); + pageContext.setAttribute("tz", tz); + Date date = new Date(883192294202L); + pageContext.setAttribute("dte", date); + %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml new file mode 100644 index 0000000000..5e97b56327 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_bundle_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf new file mode 100644 index 0000000000..763f2a2513 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf @@ -0,0 +1,21 @@ + + + + +positiveBundleBasenameNullEmptyTest + + + + + ???nullval??? + + + ???emptyval??? + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp new file mode 100644 index 0000000000..006b4b1fb4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf new file mode 100644 index 0000000000..633ecbb825 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf @@ -0,0 +1,20 @@ + + + + + +positiveBundleBasenameTest + + + + + en message + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp new file mode 100644 index 0000000000..b55826640b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf new file mode 100644 index 0000000000..8408f09d5b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positiveBundleFallbackLocaleTest + + + + fallbackLocale configuration variable as a String:
+ + + en message
+ +
+ fallbackLocale configuration variable as an instance of Locale:
+ + + en message
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp new file mode 100644 index 0000000000..c975c6a6ab --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + + + fallbackLocale configuration variable as a String:
+ + +
+
+
+ fallbackLocale configuration variable as an instance of Locale:
+ + +
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf new file mode 100644 index 0000000000..92fe2bf53b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveBundleLocaleConfigurationTest + + + + + en message + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp new file mode 100644 index 0000000000..ab97dd58e9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf new file mode 100644 index 0000000000..9b16426161 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf @@ -0,0 +1,22 @@ + + + + + + +positiveBundleLocalizationScopeTest + + + + + Should be 'en message': en message
+ + Should be ???mkey???: ???mkey???
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp new file mode 100644 index 0000000000..bbbcc170a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Should be 'en message':
+
+ Should be ???mkey???:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf new file mode 100644 index 0000000000..e99fa4195e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf @@ -0,0 +1,20 @@ + + + + + +positiveBundlePrefixTest + + + + + en message + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp new file mode 100644 index 0000000000..3f36705e37 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml new file mode 100644 index 0000000000..fffed1c8d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_message_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp new file mode 100644 index 0000000000..89824212fe --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2004, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocaleSupport" %> + + + + + + (pageContext,key): + <%= LocaleSupport.getLocalizedMessage(pageContext, "mkey") %> + + (pageContext,key,basename): + <%= LocaleSupport.getLocalizedMessage(pageContext, "mkey", + (String) pageContext.getAttribute("base", PageContext.PAGE_SCOPE)) %> + + (pageContext,key,args): + <%= LocaleSupport.getLocalizedMessage(pageContext, "pkey", + new Object[] {"Monday", "Tuesday"} ) %> + + (pageContext,key,args,basename): + <%= LocaleSupport.getLocalizedMessage(pageContext, "pkey", + new Object[] {"Monday", "Tuesday"}, + (String) pageContext.getAttribute("base", PageContext.PAGE_SCOPE)) %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp new file mode 100644 index 0000000000..491509f819 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2004, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocaleSupport" %> + + + + + + + (pageContext,key): + <%= LocaleSupport.getLocalizedMessage(pageContext, "nkey") %> + + + (pageContext,key,basename): + <%= LocaleSupport.getLocalizedMessage(pageContext, "mkey", + (String) pageContext.getAttribute("base", PageContext.PAGE_SCOPE)) %> + + + (pageContext,key,args): + <%= LocaleSupport.getLocalizedMessage(pageContext, "nkey", + new Object[] {"Monday", "Tuesday"} ) %> + + + (pageContext,key,args,basename): + <%= LocaleSupport.getLocalizedMessage(pageContext, "pkey", + new Object[] {"Monday", "Tuesday"}, + (String) pageContext.getAttribute("base", PageContext.PAGE_SCOPE)) %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf new file mode 100644 index 0000000000..ca93278193 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf @@ -0,0 +1,19 @@ + + + + + + + +positiveMessageBundleOverrideTest + + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp new file mode 100644 index 0000000000..97844576c3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf new file mode 100644 index 0000000000..4d380c5f31 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf @@ -0,0 +1,17 @@ + + + + + + + +positiveBundleMessageTest + + + + en message + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp new file mode 100644 index 0000000000..598840b8a8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf new file mode 100644 index 0000000000..97b8068ee0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveMessageCompoundNoParamTest + + + + param1: {0}, param2: {1} + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp new file mode 100644 index 0000000000..79f6bc0b1b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf new file mode 100644 index 0000000000..1e25d7a2b1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf @@ -0,0 +1,28 @@ + + + + + + + +positiveMessageFallbackLocaleTest + + + + fallbackLocale configuration variable as a String:
+ + + en message
+
+ fallbackLocale configuration variable as an instance of Locale:
+ + + en message
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp new file mode 100644 index 0000000000..e5180c4ea3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + + + fallbackLocale configuration variable as a String:
+ + +
+
+ fallbackLocale configuration variable as an instance of Locale:
+ + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf new file mode 100644 index 0000000000..418f85735f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveMessageKeyBodyTest + + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp new file mode 100644 index 0000000000..0872328aa2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + mkey + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf new file mode 100644 index 0000000000..dcecf2cf4c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveMessageKeyNotFoundTest + + + + + ???nosuchkey??? + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp new file mode 100644 index 0000000000..d35f1a6dc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf new file mode 100644 index 0000000000..95ea268bb1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf @@ -0,0 +1,20 @@ + + + + + + +positiveMessageKeyNullEmptyTest + + + + + ?????? + ?????? + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp new file mode 100644 index 0000000000..92e17fcf8e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf new file mode 100644 index 0000000000..c03902b947 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveMessageKeyParamBodyTest + + + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp new file mode 100644 index 0000000000..f19c6a10bc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + pkey + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf new file mode 100644 index 0000000000..6a5c4a9a5b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positiveMessageKeyTest + + + + + en message + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp new file mode 100644 index 0000000000..96f805d06b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf new file mode 100644 index 0000000000..9449bc2c55 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveMessageLocaleConfigurationVariableTest + + + + + en message + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp new file mode 100644 index 0000000000..c7720d09d5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf new file mode 100644 index 0000000000..4ba3838097 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positiveMessageNoLocalizationContextTest + + + + + Null LocalizationContext with null ResourceBundle provided:
+ ???mkey???
+ + Message wrapped by bundle action with a non existing ResourceBundle:
+ + ???mkey???
+ + + + No ResourceBundle found based based on localizationContext variable.
+ + ???mkey???
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp new file mode 100644 index 0000000000..b7f69742ed --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + Null LocalizationContext with null ResourceBundle provided:
+
+ + Message wrapped by bundle action with a non existing ResourceBundle:
+ +
+
+ + + No ResourceBundle found based based on localizationContext variable.
+ +
+ + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf new file mode 100644 index 0000000000..3d0fcad987 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf @@ -0,0 +1,19 @@ + + + + + + +positiveMessageParamBodyTest + + + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp new file mode 100644 index 0000000000..e96e41bdb0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf new file mode 100644 index 0000000000..d24c3d1db5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf @@ -0,0 +1,18 @@ + + + + + + +positiveMessagePrefixTest + + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp new file mode 100644 index 0000000000..038c24866d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf new file mode 100644 index 0000000000..dd91d3943b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf @@ -0,0 +1,32 @@ + + + + + + +positiveMessageScopeTest + + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp new file mode 100644 index 0000000000..66726c231b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf new file mode 100644 index 0000000000..a70d7c057b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveMessageVarTest + + + + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp new file mode 100644 index 0000000000..a6dec44f45 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml new file mode 100644 index 0000000000..4c58be6190 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_param_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf new file mode 100644 index 0000000000..ea8b077566 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf @@ -0,0 +1,17 @@ + + + + + + +positiveParamValueBodyTest + + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp new file mode 100644 index 0000000000..d1d1f00b1e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + value1 + + value2 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf new file mode 100644 index 0000000000..fac01ad346 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf @@ -0,0 +1,18 @@ + + + + + + + +positiveParamValueTest + + + + param1: value1, param2: value2 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp new file mode 100644 index 0000000000..22f07effc2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml new file mode 100644 index 0000000000..2b2cd8117d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml @@ -0,0 +1,35 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_reqenc_web + + RequestFormatFilter + RequestFormatFilter + com.sun.ts.tests.jstl.common.filters.FormatFilter + + + RequestFormatFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf new file mode 100644 index 0000000000..0de08eda1a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf @@ -0,0 +1,19 @@ + + + + + + + +positiveContentTypeEncodingTest + + + + + utf-8 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp new file mode 100644 index 0000000000..9a8f33b51a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + <%= request.getCharacterEncoding().toLowerCase() %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf new file mode 100644 index 0000000000..2b4ea24d17 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveDefaultEncodingTest + + + + + + iso-8859-1 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp new file mode 100644 index 0000000000..00a61bc84c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + <%= request.getCharacterEncoding().toLowerCase() %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf new file mode 100644 index 0000000000..3ac1db74ab --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveReqEncodingValueTest + + + + + + us-ascii + + + iso-8859-1 + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp new file mode 100644 index 0000000000..4a58517561 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + <% request.removeAttribute("charenc"); %> + + + <% request.removeAttribute("charenc"); %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf new file mode 100644 index 0000000000..7c4d58f559 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveScopedAttrEncodingTest + + + + + + us-ascii + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp new file mode 100644 index 0000000000..1eacc2e4f6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + <%= request.getCharacterEncoding().toLowerCase() %> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp new file mode 100644 index 0000000000..2da7cfb436 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + + + + <% + response.addHeader("message", (String) pageContext.getAttribute("fmessage")); + %> + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp new file mode 100644 index 0000000000..6b3da94794 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.core.Config" %> + + + + + + <% + response.addHeader("message", (String) pageContext.getAttribute("fmessage")); + %> + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml new file mode 100644 index 0000000000..c8418cc4f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_reslook_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml new file mode 100644 index 0000000000..0e1a80d885 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml @@ -0,0 +1,35 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_resenc_web + + ResponseFormatFilter + ResponseFormatFilter + com.sun.ts.tests.jstl.common.filters.FormatFilter + + + ResponseFormatFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp new file mode 100644 index 0000000000..36a665c5f6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp new file mode 100644 index 0000000000..fbd248819b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> +<%! + private void checkEncoding(PageContext context, HttpServletResponse response) { + String charset = (String) context.getAttribute("jakarta.servlet.jsp.jstl.fmt.request.charset", + PageContext.SESSION_SCOPE); + if (charset != null && charset.equals(response.getCharacterEncoding())) { + response.addHeader("charset", "attribute set"); + } + } +%> +<%@ page import="java.util.ResourceBundle" %> + + + + + <% checkEncoding(pageContext, response); %> + + + + + + <% checkEncoding(pageContext, response); %> + + + + + <%-- Export to application scope for use with message tests --%> + + <% checkEncoding(pageContext, response); %> + + + + + + <% checkEncoding(pageContext, response); %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml new file mode 100644 index 0000000000..2d6b884ba7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_setbundle_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf new file mode 100644 index 0000000000..b1b0b6e836 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf @@ -0,0 +1,28 @@ + + + + + + + + +positiveSetBundleBasenameNullEmptyTest + + + + + + + LocalizationContext is null. Test PASSED + + + + + LocalizationContext is null. Test PASSED + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp new file mode 100644 index 0000000000..7d62e654bd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf new file mode 100644 index 0000000000..a12cff6a19 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf @@ -0,0 +1,36 @@ + + + + + + + +positiveSetBundleBasenameTest + + + + + + + Property LocalizationContext properly set.
+ Message: en message
+ + + + + + + Property LocalizationContext properly set.
+ Message: en message
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp new file mode 100644 index 0000000000..b048072779 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + Property LocalizationContext properly set.
+ Message:
+
+ + + + + + Property LocalizationContext properly set.
+ Message:
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf new file mode 100644 index 0000000000..a7abd801f7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf @@ -0,0 +1,46 @@ + + + + + + + + +positiveSetBundleFallbackLocaleTest + + + + fallbackLocale configuration variable as a String:
+ + + + + Locale configuration variable type:
+ + rrb1 is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+
+ Exported LocalizationContext ResourceBundle type:
+ + rrb2 is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+
+
+ fallbackLocale configuration variable as an instance of Locale:
+ + + + + + Locale configuration variable type:
+ + rb1r is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+
+ Exported LocalizationContext ResourceBundle type:
+ + rb2r is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp new file mode 100644 index 0000000000..fa867252a7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + + + fallbackLocale configuration variable as a String:
+ + + + + Locale configuration variable type:
+ + +
+ Exported LocalizationContext ResourceBundle type:
+ + +
+
+ fallbackLocale configuration variable as an instance of Locale:
+ + + + + + Locale configuration variable type:
+ + +
+ Exported LocalizationContext ResourceBundle type:
+ + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf new file mode 100644 index 0000000000..1886e89ff3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf @@ -0,0 +1,30 @@ + + + + + + + +positiveSetBundleLocaleConfigurationTest + + + + + + + Locale configuration variable type:
+ + rb1 is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+
+ Exported LocalizationContext ResourceBundle type:
+ + rb2 is of type com.sun.ts.tests.jstl.common.resources.Resources_en
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp new file mode 100644 index 0000000000..f96ee1ec09 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> +<%@ taglib prefix="c" uri="jakarta.tags.core" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + Locale configuration variable type:
+ + +
+ Exported LocalizationContext ResourceBundle type:
+ + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf new file mode 100644 index 0000000000..cd66b04e79 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf @@ -0,0 +1,33 @@ + + + + + + +positiveSetBundleScopeLocCtxTest + + + + + jakarta.servlet.jsp.jstl.fmt.localizationContext found in page scope.
+ + + + + + + jakarta.servlet.jsp.jstl.fmt.localizationContext found in page scope.
+ + jakarta.servlet.jsp.jstl.fmt.localizationContext found in request scope.
+ jakarta.servlet.jsp.jstl.fmt.localizationContext found in session scope.
+ jakarta.servlet.jsp.jstl.fmt.localizationContext found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp new file mode 100644 index 0000000000..87cf2e2a0f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf new file mode 100644 index 0000000000..d3230b26d2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf @@ -0,0 +1,33 @@ + + + + + + + +positiveSetBundleScopeVarTest + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp new file mode 100644 index 0000000000..7c7d2b7e4b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf new file mode 100644 index 0000000000..e2de91554f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positiveFormatBundleVarTest + + + + + rbundle is of type jakarta.servlet.jsp.jstl.fmt.LocalizationContext
+ en message + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp new file mode 100644 index 0000000000..a33ad6e62b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="jakarta.servlet.jsp.jstl.fmt.LocalizationContext" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml new file mode 100644 index 0000000000..adef92d559 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml @@ -0,0 +1,26 @@ + + + + + FMT Tag Library TCK Tests for JSTL + jstl_fmt_setlocale_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf new file mode 100644 index 0000000000..2a1366ebf7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positiveSetLocaleOverrideTest + + + + + + + en message + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp new file mode 100644 index 0000000000..b8b4cbd27f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf new file mode 100644 index 0000000000..8dc63cfd0b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf @@ -0,0 +1,40 @@ + + + + + + + +positiveSetLocaleScopeTest + + + + + jakarta.servlet.jsp.jstl.fmt.locale found in page scope.
+ + + + + jakarta.servlet.jsp.jstl.fmt.locale found in page scope.
+ + + + + jakarta.servlet.jsp.jstl.fmt.locale found in request scope.
+ + + + + jakarta.servlet.jsp.jstl.fmt.locale found in session scope.
+ + + + + jakarta.servlet.jsp.jstl.fmt.locale found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp new file mode 100644 index 0000000000..8b8528dfdc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf new file mode 100644 index 0000000000..6bd879beb4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf @@ -0,0 +1,27 @@ + + + + + + + + +positveSetLocaleValueNullEmptyTest + + + + + + + Default Locale used!
+ + + + + Default Locale used!
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp new file mode 100644 index 0000000000..b8d128db3d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + String loc = Locale.getDefault().toString(); + pageContext.setAttribute("default", loc); + %> + + + + + + + <% + Object o = pageContext.getAttribute("gLoc"); + if (loc.equals(o.toString())) { + out.println("Default Locale used!
"); + } else { + out.println("Default Locale no used!
"); + } + %> + + + + + <% + o = pageContext.getAttribute("gLoc"); + if (loc.equals(o.toString())) { + out.println("Default Locale used!
"); + } else { + out.println("Default Locale no used!
"); + } + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf new file mode 100644 index 0000000000..b6ab860530 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf @@ -0,0 +1,29 @@ + + + + + + + + +positiveSetLocaleValueTest + + + + + + + fr_CA
+ + + + en_GB
+ + + + en_US
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp new file mode 100644 index 0000000000..03ede8b125 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + Locale loc = new Locale("en", "GB"); + pageContext.setAttribute("gbloc", loc); + %> + + + + + +
+ + + +
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf new file mode 100644 index 0000000000..0403ab2f61 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf @@ -0,0 +1,21 @@ + + + + + + + + +positiveSetLocaleVariantIgnoreTest + + + + + + en_US + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp new file mode 100644 index 0000000000..0364238626 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.util.Locale" %> + + <% + Locale loc = new Locale("en", "US"); + pageContext.setAttribute("loc", loc); + %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf new file mode 100644 index 0000000000..4476fa9929 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveSetLocaleVariantTest + + + + + + en_IE_EURO + + en_IE_EURO + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp new file mode 100644 index 0000000000..e62db4c004 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml new file mode 100644 index 0000000000..5d280327d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml @@ -0,0 +1,46 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf new file mode 100644 index 0000000000..1a5b1250f3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf @@ -0,0 +1,31 @@ + + + + + + + + + +negativeDateParamTypeAttributeTest + + + + + + + +

Validate sql:dateParam action specifying and invalid + value for the type attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp new file mode 100644 index 0000000000..9e358fa568 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp @@ -0,0 +1,51 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,19,19,19)); + %> + + + +

Validate sql:dateParam action specifying and invalid + value for the type attribute throws a JspException

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf new file mode 100644 index 0000000000..d22af2948f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeParamQueryBodyContentTest + + + + + +

Validate sql:query action that specifies a query with placeholders + as body content throws a JspException if there is no sql:param + action specified

+

+ + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp new file mode 100644 index 0000000000..b387bc19f3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + + + + +

Validate sql:query action that specifies a query with placeholders + as body content throws a JspException if there is no sql:param + action specified

+

+ + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_Using_Param_Query") %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf new file mode 100644 index 0000000000..45cdd7b2ac --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf @@ -0,0 +1,38 @@ + + + + + + + + + +negativeParamQuerySQLAttributeTest + + + + + + + + + +

Validate sql:query action that specifies a query with placeholders + using a sql attribute throws a JspException if there is no sql:param + action specified

+

+ + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp new file mode 100644 index 0000000000..62ee6bee6e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp @@ -0,0 +1,54 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + + + + +

Validate sql:query action that specifies a query with placeholders + using a sql attribute throws a JspException if there is no sql:param + action specified

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf new file mode 100644 index 0000000000..8321b437aa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf @@ -0,0 +1,33 @@ + + + + + + + + + +negativeParamUpdateBodyContentTest + + + + + + +

Validate sql:update action that specifies a query with placeholders + throws a JspException if there is no sql:param action specified

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp new file mode 100644 index 0000000000..236da36485 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update action that specifies a query with placeholders + throws a JspException if there is no sql:param action specified

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf new file mode 100644 index 0000000000..a5778d0ef4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +negativeParamUpdateSQLAttributeTest + + + + + + +

Validate sql:update action that specifies a query with placeholders + using a sql attribute throws a JspException if there is no sql:param + action specified

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp new file mode 100644 index 0000000000..c1003f896e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update action that specifies a query with placeholders + using a sql attribute throws a JspException if there is no sql:param + action specified

+

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf new file mode 100644 index 0000000000..3b44ec024e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf @@ -0,0 +1,34 @@ + + + + + + + + +negativeSetDataSourceDataSourceAttributeEmptyTest + + + + + + + + +

Validate that a sql:SetDataSource action which is passed an + uninitialized DataSource Object for the dataSource attribute that a + JspException will be thrown the first attempt to utilize the dataSource +

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf new file mode 100644 index 0000000000..6c06d0430e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveDateParamQueryDateTest + + + + + + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of date

+

+ + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp new file mode 100644 index 0000000000..6317b6e061 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp @@ -0,0 +1,74 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.sql.Date, java.util.*" %> + + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,0,0,0)); + %> + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of date

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf new file mode 100644 index 0000000000..2cc7c3dadd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf @@ -0,0 +1,47 @@ + + + + + + + + + +positiveDateParamQueryNoTypeTest + + + + + + + + + +

Validate sql:query, sql:dateParam actions without specifying the type + attribute defaults to timestamp

+

+ + + + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp new file mode 100644 index 0000000000..05b7508728 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp @@ -0,0 +1,73 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,20,20,20)); + %> + + + + +

Validate sql:query, sql:dateParam actions without specifying the type + attribute defaults to timestamp

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf new file mode 100644 index 0000000000..e3108b747f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveDateParamQueryTimeTest + + + + + + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of time

+

+ + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp new file mode 100644 index 0000000000..fefce442a8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.sql.Date, java.util.*" %> + + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,20,20,20)); + %> + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of time

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf new file mode 100644 index 0000000000..77bf648279 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveDateParamQueryTimestampTest + + + + + + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp

+

+ + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp new file mode 100644 index 0000000000..213fbcb09b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp @@ -0,0 +1,73 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,20,20,20)); + %> + + + + +

Validate sql:query, sql:dateParam actions specifying the type + of timestamp

+

+ <%-- Init our table prior to starting the test --%> + + + + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf new file mode 100644 index 0000000000..0ca6453aad --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf @@ -0,0 +1,57 @@ + + + + + + + + + +positiveDateParamUpdateDateTest + + + + + + + + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of date

+

+ + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp new file mode 100644 index 0000000000..643a787485 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp @@ -0,0 +1,92 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,19,19,19)); + %> + + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of date

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf new file mode 100644 index 0000000000..49ca92218d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf @@ -0,0 +1,58 @@ + + + + + + + + + +positiveDateParamUpdateNoTypeTest + + + + + + + + + + +

Validate sql:update, sql:dateParam actions without specifying the type + attribute defaults to timestamp

+

+ + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp new file mode 100644 index 0000000000..54c649a9e9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp @@ -0,0 +1,93 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,19,19,19)); + %> + + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update, sql:dateParam actions without specifying the type + attribute defaults to timestamp

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf new file mode 100644 index 0000000000..e62ed335c3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf @@ -0,0 +1,58 @@ + + + + + + + + + +positiveDateParamUpdateTimeTest + + + + + + + + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of time

+

+ + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp new file mode 100644 index 0000000000..87bf988aa1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp @@ -0,0 +1,93 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,19,19,19)); + %> + + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of time

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf new file mode 100644 index 0000000000..df95c5e2cf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf @@ -0,0 +1,58 @@ + + + + + + + + + +positiveDateParamUpdateTimestampTest + + + + + + + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of timestamp

+

+ + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp new file mode 100644 index 0000000000..45eb908dc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp @@ -0,0 +1,93 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("theDate", new java.util.Date( 101,7,30,19,19,19)); + %> + + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update, sql:dateParam actions specifying the type + of timestamp

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf new file mode 100644 index 0000000000..1bb5bea3ff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveParamBodyContentQueryTest + + + + + + + +

Validating sql:query action by specifying multiple sql:param actions and + specifying a parameter as body content via RT

+

+ + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp new file mode 100644 index 0000000000..890d5a76a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp @@ -0,0 +1,81 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Andersen"); + %> + + + + +

Validating sql:query action by specifying multiple sql:param actions and + specifying a parameter as body content via RT

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_MultiParam_Query") %> + + + + + + + + + + + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned + rows and the + expected number of rows was + . +

+ + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned the wrong row. +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf new file mode 100644 index 0000000000..579118f615 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveParamBodyContentUpdateTest + + + + + + + + + +

Validating sql:update action by specifying multiple sql:param actions and + specifying a parameter as body content via RT

+

+ + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp new file mode 100644 index 0000000000..2d428d85e0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp @@ -0,0 +1,78 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Kent"); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validating sql:update action by specifying multiple sql:param actions and + specifying a parameter as body content via RT

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + "" + which was executed with the parameter values of + and + , resulted in an update count of + and the + the expected update count was + !

+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf new file mode 100644 index 0000000000..77cecfc02b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf @@ -0,0 +1,43 @@ + + + + + + + + + +positiveParamQueryBodyContentTest + + + + + + + + +

Validating sql:query and sql:param specifying the query as body content via RT

+

+ + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp new file mode 100644 index 0000000000..4db5c07cf5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp @@ -0,0 +1,78 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + + + + +

Validating sql:query and sql:param specifying the query as body content via RT

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_Using_Param_Query") %> + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + +

ERROR:

+ The query: + "" + returned the incorrect value for the column + . The expected + value was "" and the + actual column value was "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf new file mode 100644 index 0000000000..34154039a8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveParamQueryMultiBodyContentTest + + + + + + + +

Validating sql:query action by specifying multiple sql:param actions and + the query as body content via RT

+

+ + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp new file mode 100644 index 0000000000..d524ae9081 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Andersen"); + %> + + + + +

Validating sql:query action by specifying multiple sql:param actions and + the query as body content via RT

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_MultiParam_Query") %> + + + + + + + + + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned + rows and the + expected number of rows was + . +

+ + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned the wrong row. +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf new file mode 100644 index 0000000000..6daa1288ef --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveParamQueryMultiSQLAttributeTest + + + + + + + +

Validating sql:query action by specifying multiple sql:param actions and + the query by a sql attribute via RT

+

+ + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp new file mode 100644 index 0000000000..c136b1d941 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Andersen"); + %> + + + + +

Validating sql:query action by specifying multiple sql:param actions and + the query by a sql attribute via RT

+

+ + + + + + + + + + + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned + rows and the + expected number of rows was + . +

+ + +

ERROR:

+ The query: + "" + which was executed with the parameter values of + and + returned the wrong row. +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf new file mode 100644 index 0000000000..7052cdcb6f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf @@ -0,0 +1,43 @@ + + + + + + + + + +positiveParamQuerySQLAttributeTest + + + + + + + + + +

Validating sql:query and sql:param actions using sql attribute via RT

+

+ + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp new file mode 100644 index 0000000000..6d80478f24 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + + + + +

Validating sql:query and sql:param actions using sql attribute via RT

+

+ + + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + +

ERROR:

+ The query: + "" + returned the incorrect value for the column + . The expected + value was "" and the + actual column value was "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf new file mode 100644 index 0000000000..8c9d9fa7a8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveParamUpdateBodyContentTest + + + + + + + + + +

Validate sql:update and sql:params actions allows for the + execution of a SQL statement specifying parameters

+

+ + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp new file mode 100644 index 0000000000..ab957d1588 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp @@ -0,0 +1,71 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update and sql:params actions allows for the + execution of a SQL statement specifying parameters

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf new file mode 100644 index 0000000000..d26ed4d19f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveParamUpdateMultiBodyContentTest + + + + + + + + + +

Validate sql:update and sql:params actions allows for the execution + of a SQL statement specifying multiple parameters

+

+ + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp new file mode 100644 index 0000000000..6bce24944c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp @@ -0,0 +1,75 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Kent"); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update and sql:params actions allows for the execution + of a SQL statement specifying multiple parameters

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + "" + which was executed with the parameter values of + and + , resulted in an update count of + and the + the expected update count was + !

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf new file mode 100644 index 0000000000..78761f54a6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf @@ -0,0 +1,47 @@ + + + + + + + + + +positiveParamUpdateMultiSQLAttributeTest + + + + + + + + + + +

Validate sql:update and sql:params actions allows for the + execution of a SQL statement via a sql attribute and + specifying multiple parameters

+

+ + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp new file mode 100644 index 0000000000..a7131d7e84 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp @@ -0,0 +1,78 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("key", new Integer("1")); + pageContext.setAttribute("lastName", "Kent"); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update and sql:params actions allows for the + execution of a SQL statement via a sql attribute and + specifying multiple parameters

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + "" + which was executed with the parameter values of + and + , resulted in an update count of + and the + the expected update count was + !

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf new file mode 100644 index 0000000000..2f73f44b7a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveParamUpdateSQLAttributeTest + + + + + + + + + + +

Validate sql:update action using a sql attribute and a sql:param action + allows for the execution of a SQL statement

+

+ + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp new file mode 100644 index 0000000000..deb6e14fe5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp @@ -0,0 +1,70 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:update action using a sql attribute and a sql:param action + allows for the execution of a SQL statement

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld new file mode 100644 index 0000000000..f864e033df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld @@ -0,0 +1,93 @@ + + + + + + A query tag using jakarta.servlet.jsp.jstl.sql.ResultSupport + ResultSetQuery + 1.0 + resultSetQuery + http://java.sun.com/jstltck/resultSetQuery + + + + Executes the SQL query defined in its body or through the + sql attribute. + + query + com.sun.ts.tests.jstl.spec.sql.query.ResultSetQueryTag + JSP + + +Name of the exported scoped variable for the +query result. The type of the scoped variable is +jakarta.servlet.jsp.jstl.sql. +Result (see Chapter 16 "Java APIs"). + + var + true + false + + + +SQL query statement. + + sql + false + true + + + +Data source associated with the database to +query. A String value represents a relative path +to a JNDI resource or the parameters for the +DriverManager class. + + dataSource + true + true + + + +The returned Result object includes the rows +starting at the specified index. The first row of +the original query result set is at index 0. If not +specified, rows are included starting from the +first row at index 0. + + startRow + false + true + + + +The maximum number of rows to be included in +the query result. If not specified, or set to -1, no +limit on the maximum number of rows is +enforced. + + maxRows + false + true + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml new file mode 100644 index 0000000000..0dcc6ed627 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml @@ -0,0 +1,52 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + + http://java.sun.com/jstltck/resultSetQuery + /WEB-INF/resultSetQuery.tld + + + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf new file mode 100644 index 0000000000..d62dd12fb9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQueryBodyContentTest + + + + + + +

Validate sql:query action throws JspException when an invalid SQL statement + is passed as body content

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp new file mode 100644 index 0000000000..9be4a0049f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:query action throws JspException when an invalid SQL statement + is passed as body content

+

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf new file mode 100644 index 0000000000..5ba216c76e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +negativeQueryDataSourceAttributeEmptyTest + + + + + + + + +

Validate that a sql:query action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp new file mode 100644 index 0000000000..9c87b8add6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp @@ -0,0 +1,52 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*,com.sun.ts.tests.jstl.common.wrappers.TckDataSourceWrapper" %> + + + + <%-- Create an instance of DataSource but do not configure the driver info + --%> + <% + pageContext.setAttribute("invalidDataSource", new TckDataSourceWrapper()); + %> + + + +

Validate that a sql:query action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf new file mode 100644 index 0000000000..e80cc507ae --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQueryDataSourceAttributeTest + + + + + + +

Validate that a sql:query action which is passed an invalid Datatype to the + dataSource attribute throws a JspException

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp new file mode 100644 index 0000000000..5d55f6885e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate that a sql:query action which is passed an invalid Datatype to the + dataSource attribute throws a JspException

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf new file mode 100644 index 0000000000..48bc7d2709 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeQueryDataSourceNullAttributeTest + + + + + + + +

Validate that a sql:query action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp new file mode 100644 index 0000000000..831fe11b3a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.* "%> + + + + + +

Validate that a sql:query action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf new file mode 100644 index 0000000000..ed86c7d732 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf @@ -0,0 +1,30 @@ + + + + + + + + + +negativeQueryMaxRowsAttributeTest2 + + + + + + +

Validate sql:query action maxRows attribute less than -1 throws + JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp new file mode 100644 index 0000000000..b7ca30c1f7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:query action maxRows attribute less than -1 throws + JspException

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf new file mode 100644 index 0000000000..c31eb4a9f5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQueryMaxRowsConfigTest + + + + + + + + +

Validate sql:query action that specifies invalid String value for + jakarta.servlet.jsp.jstl.sql.maxRows throws JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp new file mode 100644 index 0000000000..fd7f8ca0a0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows --%> + + + + +

Validate sql:query action that specifies invalid String value for + jakarta.servlet.jsp.jstl.sql.maxRows throws JspException

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf new file mode 100644 index 0000000000..294ebb3816 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQueryMaxRowsConfigTest2 + + + + + + + + +

Validate sql:query action that specifies less than -1 for + jakarta.servlet.jsp.jstl.sql.maxRows throws JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp new file mode 100644 index 0000000000..c8da0b9a74 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows --%> + + + + +

Validate sql:query action that specifies less than -1 for + jakarta.servlet.jsp.jstl.sql.maxRows throws JspException

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp new file mode 100644 index 0000000000..599df385eb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf new file mode 100644 index 0000000000..6709093e43 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQuerySQLAttributeTest + + + + + + +

Validate sql:query action which specifies an invalid SQL Query using + a sql attribute throws a JspException

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp new file mode 100644 index 0000000000..ec092f5a9a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import= "javax.sql.*, java.util.*" %> + + + + + +

Validate sql:query action which specifies an invalid SQL Query using + a sql attribute throws a JspException

+

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp new file mode 100644 index 0000000000..54b54f05f4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> +<%@ page import="javax.sql.*" %> + + + + + + +

Validate sql:query action with invalid scope attribute generates a translation error

+

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf new file mode 100644 index 0000000000..5a256cefaa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeQueryStartRowTest + + + + + + +

Validate sql:query action specifying invalid startRow attribute throws JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp new file mode 100644 index 0000000000..0b3eb34c6c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + +

Error:

+ A translation error should have occured! +

+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf new file mode 100644 index 0000000000..4e869818a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +positiveQueryBodyContentTest + + + + + +

Validating sql:query action specifying query as body content

+

+ + + + + + + + The query did return a Result Object that contained + 10 rows. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp new file mode 100644 index 0000000000..c17f1ba1be --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp @@ -0,0 +1,56 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:query action specifying query as body content

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + rows. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf new file mode 100644 index 0000000000..ab3a7f4371 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf @@ -0,0 +1,30 @@ + + + + + + + + + +positiveQueryDataSourceAttributeDataSourceTest + + + + + +

Validating sql:query action dataSource attribute which is passed a + DataSource Object

+

+ + + + Successfully executed a query when the dataSource attribute was passed + a DataSource object. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..035e6814fa --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:query action dataSource attribute which is passed a + DataSource Object

+

+ + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed a query when the dataSource attribute was passed + a DataSource object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..78c4cf7865 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf @@ -0,0 +1,43 @@ + + + + + + + + + +positiveQueryDataSourceAttributeDriverManagerTest + + + + + + + + +

Validate sql:query action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..4a0e9a50b3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp @@ -0,0 +1,65 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + +

Validate sql:query action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf new file mode 100644 index 0000000000..660b55a47e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf @@ -0,0 +1,37 @@ + + + + + + + + + +positiveQueryDataSourceConfigDataSourceTest + + + + + +

Validating sql:query action, the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + + + + + While using the configuration parameter + jakarta.servlet.jsp.jstl.sql.dataSource, specifying a DataSource + Object, the query succeeded. +

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp new file mode 100644 index 0000000000..2a85a1ee43 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <%-- Configure jakarta.servlet.jsp.jstl.sql.dataSource --%> + + + + +

Validating sql:query action, the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + While using the configuration parameter + jakarta.servlet.jsp.jstl.sql.dataSource, specifying a DataSource + Object, the query succeeded. +

+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf new file mode 100644 index 0000000000..00ec6f9991 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf @@ -0,0 +1,43 @@ + + + + + + + + + + +positiveQueryDataSourceConfigDriverManagerTest + + + + + + + + +

Validate sql:query by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp new file mode 100644 index 0000000000..7e07334e0a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + +

Validate sql:query by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf new file mode 100644 index 0000000000..e6146f942c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf @@ -0,0 +1,50 @@ + + + + + + + + + +positiveQueryDataSourceConfigPrecedenceTest + + + + + + +

Validate sql:query action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + + + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp new file mode 100644 index 0000000000..2c8a1f669f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*,java.util.*" %> + + + + + +

Validate sql:query action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + <%-- Validate that the dataSource attribute overrides the config param --%> + + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf new file mode 100644 index 0000000000..ecee1afe4f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +positiveQueryEmptyResultTest + + + + + +

Validating sql:query action returns empty Result object

+

+ + + + + + + + The query did return a Result object that contained + 0 rows. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp new file mode 100644 index 0000000000..efbc331182 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp @@ -0,0 +1,56 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:query action returns empty Result object

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_NoRows_Query") %> + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of + rows was "0" +

+ + + The query did return a Result object that contained + 0 rows. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf new file mode 100644 index 0000000000..3b157d3a09 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf @@ -0,0 +1,83 @@ + + + + + + + + + +positiveQueryMaxRowsAttributeTest + + + + + + + +

Validating sql:query action MaxRows attribute

+

+ + + + + + + The maxRows attribute was NOT specified and + a Result object that contained + 10 rows was + returned as expected. +

+ + + + + + + + + + The maxRows attribute was set to + -1 + and a Result object that contained + 10 rows was + returned as expected. +

+ + + + + + + + + The maxRows attribute was set to + 5 + and a Result object that contained this row count + was returned as expected. +

+ + + + + + + + + + + + The maxRows attribute was set to + 5 + and a Result object that contained this row count + was returned as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp new file mode 100644 index 0000000000..1ae9014f4b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp @@ -0,0 +1,143 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("noMaxRows", new Integer("-1")); + pageContext.setAttribute("maxRowsLimit", new Integer("5")); + %> + + + + +

Validating sql:query action MaxRows attribute

+

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was NOT specified. The + expected number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The maxRows attribute was NOT specified and + a Result object that contained + rows was + returned as expected. +

+ + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was set to + . The expected + number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The maxRows attribute was set to + + and a Result object that contained + rows was + returned as expected. +

+ + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was set to + . + The actual number of rows returned was + "". +

+ + + The maxRows attribute was set to + + and a Result object that contained this row count + was returned as expected. +

+ + + + + <%-- hard code maxRows attribute value to maxRowsLimit value --%> + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was set to + . + The actual number of rows returned was + "". +

+ + + The maxRows attribute was set to + + and a Result object that contained this row count + was returned as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf new file mode 100644 index 0000000000..d2f367640e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf @@ -0,0 +1,81 @@ + + + + + + + + +positiveQueryMaxRowsConfigTest + + + + + + + + + + + +

Validating sql:query action and jakarta.servlet.jsp.jstl.sql.maxRows config + variable as a String

+

+ + + + + + + + + The jakarta.servlet.jsp.jstl.sql.maxRows config + variable was set to 5 + and a Result object that contained this row count was + returned as expected. +

+ + + + + + + + + + + The maxRows attribute did override the config value for + jakarta.servlet.jsp.jstl.sql.maxRows and a Result object that + contained "2" + rows was returned as expected. +

+ + + + + + + + + + + + The config parameter jakarta.servlet.jsp.sql.maxRows + was set to -1. + A Result object that contained + 10 rows was returned as + expected. +

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp new file mode 100644 index 0000000000..95e5064233 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp @@ -0,0 +1,129 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + <% + pageContext.setAttribute("configMaxRowsLimit", new Integer("5")); + pageContext.setAttribute("configNoMaxRowsLimit", new Integer("-1")); + pageContext.setAttribute("maxRowsLimit", new Integer("2")); + %> + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to configMaxRowsLimit--%> + + + + +

Validating sql:query action and jakarta.servlet.jsp.jstl.sql.maxRows config + variable as a String

+

+ <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to configMaxRowsLimit--%> + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The jakarta.servlet.jsp.jstl.sql.maxRows config variable + was set to . + The actual number of rows returned was + "". +

+ + + The jakarta.servlet.jsp.jstl.sql.maxRows config + variable was set to + and a Result object that contained this row count was + returned as expected. +

+ + + + <%-- Validate that maxRows Attribute overrides the config value for maxRows --%> + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + +

ERROR:

+ The maxRows attribute was set to + and did not overide + the config value for jakarta.servlet.jsp.jstl.sql.maxRows which was set to + . + The actual number of rows returned was + "". +

+ + + The maxRows attribute did override the config value for + jakarta.servlet.jsp.jstl.sql.maxRows and a Result object that + contained "" + rows was returned as expected. +

+ + + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to configMaxRowsLimit--%> + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The config parameter jakarta.servlet.jsp.sql.maxRows + was set to . + The expected number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The config parameter jakarta.servlet.jsp.sql.maxRows + was set to . + A Result object that contained + rows was returned as + expected. +

+ + + + <%-- Clear out our maxRows config variable --%> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf new file mode 100644 index 0000000000..7572cee460 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf @@ -0,0 +1,83 @@ + + + + + + + + + +positiveQueryMaxRowsIntegerConfigTest + + + + + + + + +

Validating sql:query action and jakarta.servlet.jsp.jstl.sql.maxRows config + variable passed as an Integer

+

+ + + + + + + + + + + + + The jakarta.servlet.jsp.jstl.sql.maxRows config + variable was set to 5 + and a Result object that contained this row count was + returned as expected. +

+ + + + + + + + + + + + The maxRows attribute did override the config value for + jakarta.servlet.jsp.jstl.sql.maxRows and a Result object that + contained "2" + rows was returned as expected. +

+ + + + + + + + + + + + The config parameter jakarta.servlet.jsp.sql.maxRows + was set to -1. + A Result object that contained + 10 rows was returned as + expected. +

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp new file mode 100644 index 0000000000..fe61b80538 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp @@ -0,0 +1,135 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("configMaxRowsLimit", new Integer("5")); + pageContext.setAttribute("configNoMaxRowsLimit", new Integer("-1")); + pageContext.setAttribute("maxRowsLimit", new Integer("2")); + %> + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to using an Integer configMaxRowsLimit--%> + + +

Validating sql:query action and jakarta.servlet.jsp.jstl.sql.maxRows config + variable passed as an Integer

+

+ + + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to using an Integer configMaxRowsLimit--%> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The jakarta.servlet.jsp.jstl.sql.maxRows config variable + was set to . + The actual number of rows returned was + "". +

+ + + The jakarta.servlet.jsp.jstl.sql.maxRows config + variable was set to + and a Result object that contained this row count was + returned as expected. +

+ + + + <%-- Validate that maxRows Attribute overrides the config value for maxRows --%> + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + +

ERROR:

+ The maxRows attribute was set to + and did not overide + the config value for jakarta.servlet.jsp.jstl.sql.maxRows which was set to + . + The actual number of rows returned was + "". +

+ + + The maxRows attribute did override the config value for + jakarta.servlet.jsp.jstl.sql.maxRows and a Result object that + contained "" + rows was returned as expected. +

+ + + + <%-- configure jakarta.servlet.jsp.jstl.sql.maxRows to have no limit--%> + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The config parameter jakarta.servlet.jsp.sql.maxRows + was set to . + The expected number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The config parameter jakarta.servlet.jsp.sql.maxRows + was set to . + A Result object that contained + rows was returned as + expected. +

+ + + + <%-- Clear out our maxRows config variable --%> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf new file mode 100644 index 0000000000..390a07b03f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +positiveQuerySQLAttributeTest + + + + + +

Validate the sql:query action ability to execute a SQL query + by using the sql attribute

+

+ + + + + + The query did return a Result object that contained + 10 rows. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp new file mode 100644 index 0000000000..f99696ae3b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate the sql:query action ability to execute a SQL query + by using the sql attribute

+

+ + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result object that contained + rows. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf new file mode 100644 index 0000000000..d3ec8ae254 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf @@ -0,0 +1,46 @@ + + + + + + + + + +positiveQueryScopeAttributeTest + + + + + + +

Validating sql:query action scope attributes

+

+ + + riPage found in page scope.
+ + + + rePage found in page scope.
+ + + + reSession found in session scope.
+ + + + reRequest found in request scope.
+ + + + + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp new file mode 100644 index 0000000000..0e83756438 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:query action scope attributes

+

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf new file mode 100644 index 0000000000..1f15ae51fe --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf @@ -0,0 +1,114 @@ + + + + + + + + + +positiveQueryStartRowAttributeTest + + + + + + + + + + +

Validating sql:query action startRow attribute

+

+ + + + + + + + The startRow attribute was NOT specified and + a Result Object that contained + 10 rows was + returned as expected. +

+ + + + + + + + + + The startRow attribute was set to + 0 + and a Result Object that contained + 10 rows was + returned as expected. +

+ + + + + + + + + + + + The startRow attribute was set to + 1. + The query resulted in the first row having a value of + "2" for the + first column as expected. +

+ + + + + + + + + + + + + + The startRow attribute was set to + 1. + The query resulted in the first row having a value of + "2" for the + first column as expected. +

+ + + + + + + + + + + + + The startRow attribute was set to + 1. + The maxRows attribute was set to + "8". + The query resulted in the first row having a value of + "2" for the + first column as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp new file mode 100644 index 0000000000..d4221d5843 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp @@ -0,0 +1,221 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("noStartRow", new Integer("0")); + pageContext.setAttribute("startingRow", new Integer("1")); + pageContext.setAttribute("maxRows", new Integer("8")); + %> + + + + + +

Validating sql:query action startRow attribute

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_By_Id_Query") %> + + + + +

ERROR:

+ The startRow attribute was NOT specified. The + expected number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The startRow attribute was NOT specified and + a Result Object that contained + rows was + returned as expected. +

+ + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_By_Id_Query") %> + + + + +

ERROR:

+ The startRow attribute was set to + . The expected + number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The startRow attribute was set to + + and a Result Object that contained + rows was + returned as expected. +

+ + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_By_Id_Query") %> + + + + + + +

ERROR:

+ The startRow attribute was set to + . + The expected number of rows returned was + "". + The actual number of rows returned was + "". +

+ + +

ERROR:

+ The startRow attribute was set to + . + The query + "" + should have resulted in the first row having a value of + "" for the + first column. +

+ + + The startRow attribute was set to + . + The query resulted in the first row having a value of + "" for the + first column as expected. +

+ + + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_By_Id_Query") %> + + + + + + +

ERROR:

+ The startRow attribute was set to + . + The expected number of rows returned was + "". + The actual number of rows returned was + "". +

+ + +

ERROR:

+ The startRow attribute was set to + . + The query + "" + should have resulted in the first row having a value of + "" for the + first column. +

+ + + The startRow attribute was set to + . + The query resulted in the first row having a value of + "" for the + first column as expected. +

+ + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Select_Jstl_Tab1_By_Id_Query") %> + + + + + + +

ERROR:

+ The startRow attribute was set to + . + The maxRows attribute was set to + "". + The actual number of rows returned was + "". +

+ + +

ERROR:

+ The startRow attribute was set to + . + The query + "" + should have resulted in the first row having a value of + "" for the + first column. +

+ + + The startRow attribute was set to + . + The maxRows attribute was set to + "". + The query resulted in the first row having a value of + "" for the + first column as expected. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf new file mode 100644 index 0000000000..525cbc5718 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf @@ -0,0 +1,28 @@ + + + + + + + + + +positiveQueryVarAttributeTest + + + + + + +

Validating sql:query action var attribute is of type jakarta.servlet.jsp.jstl.sql.Result

+

+ + + + resultSet2 is of type jakarta.servlet.jsp.jstl.sql.Result
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp new file mode 100644 index 0000000000..3d7db8482e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*" %> + + + + + +

Validating sql:query action var attribute is of type jakarta.servlet.jsp.jstl.sql.Result

+

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp new file mode 100644 index 0000000000..261d108a8f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp @@ -0,0 +1,81 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ taglib prefix="resultSetQuery" uri="http://java.sun.com/jstltck/resultSetQuery" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("maxRowsLimit", new Integer("5")); + %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was NOT specified. The + expected number of rows + "" was not + returned. The actual number of rows returned was + "". +

+ + + The maxRows attribute was NOT specified and + a Result object that contained + rows was + returned as expected. Test PASSED. +

+ + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was set to + . + The actual number of rows returned was + "". +

+ + + The maxRows attribute was set to + + and a Result object that contained this row count + was returned as expected. Test PASSED. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml new file mode 100644 index 0000000000..5d280327d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml @@ -0,0 +1,46 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf new file mode 100644 index 0000000000..1f595f9ed5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf @@ -0,0 +1,39 @@ + + + + + + + + + +positiveResultGetColumnNamesCountTest + + + + + +

Validate ability to utilize Result.getColumnNames() to access the + returned column values

+

+ + + + + + + + + + The Correct number of columns was + returned from Result.getColumnNames(). +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp new file mode 100644 index 0000000000..3891cd943e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate ability to utilize Result.getColumnNames() to access the + returned column values

+

+ + + + + + <% + String[] columns = (String[]) pageContext.getAttribute("column2"); + pageContext.setAttribute("columnsReturned2", new Integer(columns.length)); + %> + + + + The Correct number of columns was + returned from Result.getColumnNames(). +

+ + +

Error

The Expected number of columns was not returned from + Result.getColumNames. The expected number of columns was + , + the returned number of columns was + using the query + + . +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf new file mode 100644 index 0000000000..940797b294 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf @@ -0,0 +1,41 @@ + + + + + + + + + +positiveResultGetColumnNamesTest + + + + + + + + + +

Validate ability to utilize Result.getColumnNames() to access the + returned column values

+

+ + + + + + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp new file mode 100644 index 0000000000..64ad89b408 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + +

Validate ability to utilize Result.getColumnNames() to access the + returned column values

+

+ + + + + + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + +

Error

Could not access the column values using the column + names returned from Result.getColumnNames(). The expected values where + , , + . The values returned were + , , + . +

+ + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf new file mode 100644 index 0000000000..57ee7b878c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf @@ -0,0 +1,39 @@ + + + + + + + + + +positiveResultGetRowsByIndexCountTest + + + + + +

Validate ability to utilize Result.getRowsByIndex() to access the + returned rows. Check that the correct row count is returned

+

+ + + + + + + + + The Correct number of rows was + returned from Result.getRowsByIndex(). +

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp new file mode 100644 index 0000000000..6d21af5e31 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp @@ -0,0 +1,62 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate ability to utilize Result.getRowsByIndex() to access the + returned rows. Check that the correct row count is returned

+

+ + + + + <% + Object[][] rows = (Object[][]) pageContext.getAttribute("rows2"); + pageContext.setAttribute("rowsReturned2", new Integer(rows.length)); + %> + + + + The Correct number of rows was + returned from Result.getRowsByIndex(). +

+ + +

Error

The Expected number of rows was not returned from + Result.getRowsByIndex(). The expected number of columns was + , + the returned number of rows was + using the query + . +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf new file mode 100644 index 0000000000..74df4fc4a4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveResultGetRowsByIndexTest + + + + + + + + + +

Validate ability to utilize Result.getRowsByIndex() to access the + returned column values

+

+ + + + + + + + + Successfully accessed each column value using Result.getRowsByIndex(). +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp new file mode 100644 index 0000000000..cc5308d973 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp @@ -0,0 +1,62 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + +

Validate ability to utilize Result.getRowsByIndex() to access the + returned column values

+

+ + + + + + + + + Successfully accessed each column value using Result.getRowsByIndex(). +

+ + +

Error

Could not access the column values using + Result.getRowsByIndex(). The expected values where + , , + . The values returned were + , , + . +

+ + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf new file mode 100644 index 0000000000..24c4c7dd08 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf @@ -0,0 +1,38 @@ + + + + + + + + + +positiveResultGetRowsCountTest + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned

+

+ + + + + + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp new file mode 100644 index 0000000000..e5f6423c4f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp @@ -0,0 +1,61 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate ability to utilize Result.getRows() to access the + returned rows. Check that the correct row count is returned

+

+ + + + + <% + SortedMap[] rows = (SortedMap[]) pageContext.getAttribute("rows2"); + pageContext.setAttribute("rowsReturned2", new Integer(rows.length)); + %> + + + + The Correct number of rows was + returned from Result.getRows(). +

+ + +

Error

The Expected number of rows was not returned from + Result.getRows. The expected number of columns was + , + the returned number of rows was + using the query + . +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf new file mode 100644 index 0000000000..6c7e518f40 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf @@ -0,0 +1,47 @@ + + + + + + + + + +positiveResultGetRowsLowerCaseTest + + + + + + + + + + +

Validate the access to Result.getRows via a column name is case + insensitive testing using Lower Case via RT

+

+ + + + + + + + + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp new file mode 100644 index 0000000000..347c324496 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + + +

Validate the access to Result.getRows via a column name is case + insensitive testing using Lower Case via RT

+

+ + + + + + + <%-- Convert the column names to Lower Case to validate case insensitivity --%> + <% + String columns2 [] = (String[])pageContext.getAttribute("column2"); + pageContext.setAttribute("IDNUM2", columns2[0].toLowerCase()); + pageContext.setAttribute("FIRSTNAME2", columns2[1].toLowerCase()); + pageContext.setAttribute("LASTNAME2", columns2[2].toLowerCase()); + + + %> + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + +

Error

Could not access the column values using the column + names returned from Result.getColumnNames(). The expected values were + , , + . The values returned were + , , + . +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf new file mode 100644 index 0000000000..31b435b8df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveResultGetRowsUpperCaseTest + + + + + + + + + +

Validate the access to Result.getRows via a column name is case + insensitive testing using Upper Case via RT

+

+ + + + + + + + + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp new file mode 100644 index 0000000000..20dffd34ec --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp @@ -0,0 +1,74 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + +

Validate the access to Result.getRows via a column name is case + insensitive testing using Upper Case via RT

+

+ + + + + + + <%-- Convert the column names to Upper Case to validate case insensitivity --%> + <% + String columns2 [] = (String[])pageContext.getAttribute("column2"); + pageContext.setAttribute("IDNUM2", columns2[0].toUpperCase()); + pageContext.setAttribute("FIRSTNAME2", columns2[1].toUpperCase()); + pageContext.setAttribute("LASTNAME2", columns2[2].toUpperCase()); + + + %> + + + + Successfully accessed each column value using the column name + returned from Result.getColumnNames(). +

+ + +

Error

Could not access the column values using the column + names returned from Result.getColumnNames(). The expected values were + , , + . The values returned were + , , + . +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf new file mode 100644 index 0000000000..17984e2b9e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf @@ -0,0 +1,80 @@ + + + + + + + + + +positiveResultIsLimitedByMaxRowsTest + + + + + + + +

Validating sql:query action and Result.isLimitedByMaxRows

+

+ + + + + + + The maxRows attribute was NOT specified. The value + returned from Result.isLimitedByMaxRows() was + false as expected. +

+ + + + + + + + + + The maxRows attribute was set to + -1. The value + returned from Result.isLimitedByMaxRows() was + false as expected. +

+ + + + + + + + The maxRows attribute was set to + 5. The value + returned from Result.isLimitedByMaxRows() was + true as expected. +

+ + + + + + + + + + + + The maxRows attribute was set to + 5. The value + returned from Result.isLimitedByMaxRows() was + true as expected. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp new file mode 100644 index 0000000000..2a3eeae642 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp @@ -0,0 +1,133 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("noMaxRows", new Integer("-1")); + pageContext.setAttribute("maxRowsLimit", new Integer("5")); + %> + + + +

Validating sql:query action and Result.isLimitedByMaxRows

+

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was NOT specified. The value + returned from Result.isLimitedByMaxRows() was + true. The expected value was false. +

+ + + The maxRows attribute was NOT specified. The value + returned from Result.isLimitedByMaxRows() was + false as expected. +

+ + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + +

ERROR:

+ The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + true. The expected value was false. +

+ + + The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + false as expected. +

+ + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + true as expected. +

+ + +

ERROR:

+ The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + false. The expected value was true. +

+ + + + + <%-- Hard code maxRows to the value of maxRowsLimit --%> + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + true as expected. +

+ + +

ERROR:

+ The maxRows attribute was set to + . The value + returned from Result.isLimitedByMaxRows() was + +
+ + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml new file mode 100644 index 0000000000..5d280327d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml @@ -0,0 +1,46 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf new file mode 100644 index 0000000000..2a72f21f2b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeSetDataSourceDataSourceAttributeDataSourceTest + + + + + + + +

Validate sql:query and setDataSource actions by specifying an invalid + object as the dataSource attribute

+

+ + + + + +The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..2a4123abdb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("invalidDataSource", new Integer("-1")); + %> + + + +

Validate sql:query and setDataSource actions by specifying an invalid + object as the dataSource attribute

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..531f04f442 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeSetDataSourceDataSourceAttributeDriverManagerTest + + + + + + + + +

Validate sql:query and setDataSource actions by specifying a String with + invalid DriverManager parameters as the dataSource attribute

+

+ + + + +The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..380c62a3cc --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:query and setDataSource actions by specifying a String with + invalid DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf new file mode 100644 index 0000000000..3b44ec024e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf @@ -0,0 +1,34 @@ + + + + + + + + +negativeSetDataSourceDataSourceAttributeEmptyTest + + + + + + + + +

Validate that a sql:SetDataSource action which is passed an + uninitialized DataSource Object for the dataSource attribute that a + JspException will be thrown the first attempt to utilize the dataSource +

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp new file mode 100644 index 0000000000..982ea9d587 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*,com.sun.ts.tests.jstl.common.wrappers.TckDataSourceWrapper" %> + + + <% + pageContext.setAttribute("invalidDataSource", new TckDataSourceWrapper()); + %> + + + + +

Validate that a sql:SetDataSource action which is passed an + uninitialized DataSource Object for the dataSource attribute that a + JspException will be thrown the first attempt to utilize the dataSource +

+

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf new file mode 100644 index 0000000000..55cd01aa79 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf @@ -0,0 +1,30 @@ + + + + + + + + +negativeSetDataSourceDataSourceNullAttributeTest + + + + + + +

Validate that a sql:SetDataSource action which is passed an Null DataSource + Object for the dataSource attribute that a JspException will be thrown

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp new file mode 100644 index 0000000000..096b8be339 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + +

Validate that a sql:SetDataSource action which is passed an Null DataSource + Object for the dataSource attribute that a JspException will be thrown

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp new file mode 100644 index 0000000000..ca13b8a5a4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf new file mode 100644 index 0000000000..8e8099c571 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + +positiveSetDataSourceQueryDataSourceTest + + + + + + +

Validate sql:query and setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp new file mode 100644 index 0000000000..e49d99fe55 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp @@ -0,0 +1,80 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:query and setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf new file mode 100644 index 0000000000..437706f48d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + +positiveSetDataSourceQueryDriverManagerTest + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp new file mode 100644 index 0000000000..58562ba550 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp @@ -0,0 +1,82 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf new file mode 100644 index 0000000000..5e7b364090 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + +positiveSetDataSourceQueryNoVarAttributeDataSourceTest + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..43936adcd1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp @@ -0,0 +1,78 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that + was raised is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using aDataSource Object for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..c844d8bdba --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf @@ -0,0 +1,56 @@ + + + + + + + + + +positiveSetDataSourceQueryNoVarAttributeDriverManagerTest + + + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..3c1905d118 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp @@ -0,0 +1,83 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf new file mode 100644 index 0000000000..b24d31d460 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf @@ -0,0 +1,57 @@ + + + + + + + + + +positiveSetDataSourceQueryURLTest + + + + + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when sql:setDataSource was provided + the url, driver, user, password attributes. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp new file mode 100644 index 0000000000..ea591602ec --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp @@ -0,0 +1,91 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + + + +

Validate sql:query and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using the attributes + ! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using the sql:setDatasource attributes + to create the + DataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when sql:setDataSource was provided + the url, driver, user, password attributes. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp new file mode 100644 index 0000000000..71763a2ae7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp @@ -0,0 +1,109 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*, + jakarta.servlet.jsp.jstl.core.Config" %> + + + + + +

Validating sql:setDataSource action scope attributes

+

+ + + + + + + + + + <% + final String DS_VARNAME = "jakarta.servlet.jsp.jstl.sql.dataSource"; + Object pageScope = Config.get(pageContext, DS_VARNAME, PageContext.PAGE_SCOPE); + Object requestScope = Config.get(pageContext, DS_VARNAME, PageContext.REQUEST_SCOPE); + Object sessionScope = Config.get(pageContext, DS_VARNAME, PageContext.SESSION_SCOPE); + Object applicationScope = Config.get(pageContext, DS_VARNAME, PageContext.APPLICATION_SCOPE); + + if (pageScope != null) { + if (pageScope instanceof javax.sql.DataSource) { + if (requestScope != null) { + if (requestScope instanceof javax.sql.DataSource) { + if (sessionScope != null) { + if (sessionScope instanceof javax.sql.DataSource) { + if (applicationScope != null) { + if (applicationScope instanceof javax.sql.DataSource) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute " + + "was set in the application scope, but was not an instance of javax.sql.DataSource."); + out.println("Actual type: " + applicationScope.getClass().getName()); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute was not " + + "set when sql:setDataSource was called when application scope was specified and var was not."); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute " + + "was set in the session scope, but was not an instance of javax.sql.DataSource."); + out.println("Actual type: " + sessionScope.getClass().getName()); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute was not " + + "set when sql:setDataSource was called when session scope was specified and var was not."); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute " + + "was set in the request scope, but was not an instance of javax.sql.DataSource."); + out.println("Actual type: " + requestScope.getClass().getName()); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute was not " + + "set when sql:setDataSource was called when request scope was specified and var was not."); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute " + + "was set in the page scope, but was not an instance of javax.sql.DataSource."); + out.println("Actual type: " + requestScope.getClass().getName()); + } + } else { + out.println("Test FAILED. The jakarta.servlet.jsp.jstl.sql.dataSource attribute was not " + + "set when sql:setDataSource was called when page scope was specified and var was not."); + } + %> + + <%-- clean up --%> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf new file mode 100644 index 0000000000..53074f3463 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveSetDataSourceScopeVarAttributeTest + + + + + + +

Validating sql:setDataSource action scope attributes

+

+ + + riPage found in page scope.
+ + + + rePage found in page scope.
+ + + + reSession found in session scope.
+ + + + reRequest found in request scope.
+ + + + reApplication found in application scope.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp new file mode 100644 index 0000000000..56e39d2adb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:setDataSource action scope attributes

+

+ + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf new file mode 100644 index 0000000000..fe9ea292f9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf @@ -0,0 +1,54 @@ + + + + + + + + + +positiveSetDataSourceTxDataSourceTest + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp new file mode 100644 index 0000000000..a74431b7d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp @@ -0,0 +1,80 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf new file mode 100644 index 0000000000..451a1c457d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf @@ -0,0 +1,57 @@ + + + + + + + + + + +positiveSetDataSourceTxDriverManagerTest + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a String + with DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp new file mode 100644 index 0000000000..30d63e6a81 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp @@ -0,0 +1,85 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a String + with DriverManager parameters as the dataSource attribute

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf new file mode 100644 index 0000000000..16113cb267 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + + +positiveSetDataSourceTxNoVarAttributeDataSourceTest + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..9bfb3c6bff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that + was raised is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using aDataSource Object for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..11411d8b77 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf @@ -0,0 +1,57 @@ + + + + + + + + + + +positiveSetDataSourceTxNoVarAttributeDriverManagerTest + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..1c5b7a0a89 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp @@ -0,0 +1,85 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf new file mode 100644 index 0000000000..371944abe9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf @@ -0,0 +1,61 @@ + + + + + + + + + + +positiveSetDataSourceTxURLTest + + + + + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp new file mode 100644 index 0000000000..c79031f6c4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp @@ -0,0 +1,92 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + + + + +

Validate sql:transaction and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf new file mode 100644 index 0000000000..8c6ba88219 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + +positiveSetDataSourceUpdateDataSourceTest + + + + + + +

Validate sql:update and setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp new file mode 100644 index 0000000000..cb04f2bb2e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp @@ -0,0 +1,80 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update and setDataSource actions by specifying a DataSource + Object as the dataSource attribute

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf new file mode 100644 index 0000000000..8274535a02 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf @@ -0,0 +1,51 @@ + + + + + + + + +positiveSetDataSourceQueryDriverManagerTest + + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp new file mode 100644 index 0000000000..23aaea9c4c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp @@ -0,0 +1,81 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using + for the dataSource attribute! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf new file mode 100644 index 0000000000..b970039929 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf @@ -0,0 +1,52 @@ + + + + + + + + + +positiveSetDataSourceUpdateNoVarAttributeDataSourceTest + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..90985ff1d1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp @@ -0,0 +1,77 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a + DataSource object for jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using a DataSource Object + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that + was raised is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..33c9a57665 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf @@ -0,0 +1,54 @@ + + + + + + + + + +positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest + + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..337dfb4273 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp @@ -0,0 +1,82 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying a String with + DriverManager parameters as the jakarta.servlet.jsp.jstl.sql.dataSource + configuration Parameter

+

+ + + + + + +

ERROR:

+ Could not create a dataSource using + for jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource was + provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf new file mode 100644 index 0000000000..50936fde48 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf @@ -0,0 +1,57 @@ + + + + + + + + + +positiveSetDataSourceQueryURLTest + + + + + + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + + + Successfully created a DataSource. +

+ + + + + + + + + + + + + Successfully executed the query when sql:setDataSource was provided + the url, driver, user, password attributes. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp new file mode 100644 index 0000000000..86b0af2caf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp @@ -0,0 +1,91 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + + + +

Validate sql:update and sql:setDataSource actions by specifying the url, + driver, user, password attributes

+

+ + + + + + + +

ERROR:

+ Could not create a dataSource using the attributes + ! The Exception that was raised + is: . +

+ + + Successfully created a DataSource. +

+ + + + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using the sql:setDatasource attributes + to create the + DataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when sql:setDataSource was provided + the url, driver, user, password attributes. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml new file mode 100644 index 0000000000..5d280327d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml @@ -0,0 +1,46 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf new file mode 100644 index 0000000000..c72ca6bdd0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf @@ -0,0 +1,33 @@ + + + + + + + + + +negativeTxDataSourceAttributeEmptyTest + + + + + + + +

Validate that a sql:transaction action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp new file mode 100644 index 0000000000..1a80cf6203 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*,com.sun.ts.tests.jstl.common.wrappers.TckDataSourceWrapper" %> + + + + <% + pageContext.setAttribute("invalidDataSource", new TckDataSourceWrapper()); + %> + + + +

Validate that a sql:transaction action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf new file mode 100644 index 0000000000..d4b2f4a78d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf @@ -0,0 +1,32 @@ + + + + + + + + + +negativeTxDataSourceAttributeTest + + + + + + + +

Validate that a sql:transaction action which is passed an invalid + DataType for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp new file mode 100644 index 0000000000..ca41ce709c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("invalidDataSource", new Integer(1)); + %> + + + +

Validate that a sql:transaction action which is passed an invalid + DataType for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf new file mode 100644 index 0000000000..532a36e58d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf @@ -0,0 +1,33 @@ + + + + + + + + + +negativeTxDataSourceNullAttributeTest + + + + + + + +

Validate that a sql:transaction action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp new file mode 100644 index 0000000000..b2a163d6da --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate that a sql:transaction action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp new file mode 100644 index 0000000000..798ea0392f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully

+

+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp new file mode 100644 index 0000000000..9373785b3c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + +

Error :

+ You should have encountered a translation error as sql:query action cannot + specify a dataSource attribute within a sql:transaction action! +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp new file mode 100644 index 0000000000..239b7d378e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + +

Error :

+ You should have encountered a translation error as sql:update action cannot + specify a dataSource attribute within a sql:transaction action! +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf new file mode 100644 index 0000000000..965fbc8aad --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf @@ -0,0 +1,50 @@ + + + + + + + + + +positiveTxCommitLifeCycleTest + + + + + +

Validate sql:transaction action LifeCycle for a committed transaction

+

+ + + + + + + + Dump LifeCycle for sql:transaction action for a committed transaction +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.commit() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp new file mode 100644 index 0000000000..c6554e21f2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction action LifeCycle for a committed transaction

+

+ + + + + + + + Dump LifeCycle for sql:transaction action for a committed transaction +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf new file mode 100644 index 0000000000..7192b2acfe --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveTxDataSourceAttributeDataSourceTest + + + + + +

Validate sql:transaction action specifying a DataSource Object + as the dataSource attribute

+

+ + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..a337d196d0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp @@ -0,0 +1,60 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction action specifying a DataSource Object + as the dataSource attribute

+

+ + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using a DataSource Object for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided a DataSource Object. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..6ad2d6275c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf @@ -0,0 +1,42 @@ + + + + + + + + + +positiveTxDataSourceAttributeDriverManagerTest + + + + + + + +

Validate sql:query action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..65c88ddb79 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:query action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf new file mode 100644 index 0000000000..34820d2ed6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveTxDataSourceConfigDataSourceTest + + + + + + +

Validating sql:transaction, sql:query actions, the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + + + + + + + + + + + While using the configuration parameter + jakarta.servlet.jsp.jstl.sql.dataSource, specifying a DataSource + Object, the query succeeded. +

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp new file mode 100644 index 0000000000..3fc17067ba --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp @@ -0,0 +1,67 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*,java.util.*" %> + + + + + +

Validating sql:transaction, sql:query actions, the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + <%-- Configure jakarta.servlet.jsp.jstl.sql.dataSource --%> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + +

ERROR:

+ While using the configuration parameter + jakarta.servlet.jsp.jstl.sql.dataSource, specifying a DataSource + Object, the query: + "" , the expected + number of rows "" + was not returned. The actual number of rows returned was + "". +

+ + + While using the configuration parameter + jakarta.servlet.jsp.jstl.sql.dataSource, specifying a DataSource + Object, the query succeeded. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf new file mode 100644 index 0000000000..6c154a8f11 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf @@ -0,0 +1,43 @@ + + + + + + + + + +positiveTxDataSourceConfigDriverManagerTest + + + + + + + + +

Validate sql:transaction by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp new file mode 100644 index 0000000000..ffb2baab61 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + +

Validate sql:transaction by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf new file mode 100644 index 0000000000..dcf83ccac0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf @@ -0,0 +1,49 @@ + + + + + + + + + +positiveTxDataSourceConfigPrecedenceTest + + + + + +

Validate sql:transaction action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + + + + + + + + + + + + + The dataSource attribute did take precedence over + jakarta.servlet.jsp.jstl.sql.dataSource. The query executed without + an error. +

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp new file mode 100644 index 0000000000..d2c1df9043 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Simple_Select_Query") %> + + + + + + + +

ERROR:

+ jakarta.servlet.jsp.jstl.sql.dataSource did take + precedence over the dataSource attribute!The Exception + that was raised is: + . +

+ + + The dataSource attribute did take precedence over + jakarta.servlet.jsp.jstl.sql.dataSource. The query executed without + an error. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf new file mode 100644 index 0000000000..eace45d1b8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf @@ -0,0 +1,56 @@ + + + + + + + + + +positiveTxIsolationAttributeRead_CommittedTest + + + + + + + + + + +

Validate sql:transaction action which specifies read_committed for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.commit() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp new file mode 100644 index 0000000000..ad524c8623 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("isoLevel", new Integer(2), PageContext.APPLICATION_SCOPE); + %> + + + + + +

Validate sql:transaction action which specifies read_committed for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf new file mode 100644 index 0000000000..c552636c7a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf @@ -0,0 +1,62 @@ + + + + + + + + + +positiveTxIsolationAttributeRead_UnCommittedTest + + + + + + + + + + +

Validate sql:transaction action which specifies read_uncommitted for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED) +
+ + Connection.commit() +
+ + Connection.setTransactionIsolation() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp new file mode 100644 index 0000000000..d990a55dd6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("isoLevel", new Integer(1), PageContext.APPLICATION_SCOPE); + %> + + + + + +

Validate sql:transaction action which specifies read_uncommitted for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf new file mode 100644 index 0000000000..f8e0ae49bf --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf @@ -0,0 +1,62 @@ + + + + + + + + + +positiveTxIsolationAttributeRepeatable_Read + + + + + + + + + + +

Validate sql:transaction action which specifies repeatable_read for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.setTransactionIsolation(TRANSACTION_REPEATABLE_READ) +
+ + Connection.commit() +
+ + Connection.setTransactionIsolation() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp new file mode 100644 index 0000000000..f2b7dbe535 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("isoLevel", new Integer(4), PageContext.APPLICATION_SCOPE); + %> + + + + + +

Validate sql:transaction action which specifies repeatable_read for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf new file mode 100644 index 0000000000..d3033483a0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf @@ -0,0 +1,62 @@ + + + + + + + + + +positiveTxIsolationAttributeSerializable + + + + + + + + + + +

Validate sql:transaction action which specifies serializable for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.setTransactionIsolation(TRANSACTION_SERIALIZABLE) +
+ + Connection.commit() +
+ + Connection.setTransactionIsolation() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp new file mode 100644 index 0000000000..7037a80ab2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + <% + pageContext.setAttribute("isoLevel", new Integer(8), PageContext.APPLICATION_SCOPE); + %> + + + + + +

Validate sql:transaction action which specifies serializable for the + isolation attribute

+

+ + + + + + + + Dump LifeCycle for sql:transaction action setting isolation attribute +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf new file mode 100644 index 0000000000..bc3b56e1fd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf @@ -0,0 +1,38 @@ + + + + + + + + + +positiveTxQueryCommitTest + + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully

+

+ + + + + + + + + The query did return a Result Object that contained + 10 rows. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp new file mode 100644 index 0000000000..290e3a0f9b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:transaction and sql:query actions allow for a query + to be executed successfully

+

+ + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + rows. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf new file mode 100644 index 0000000000..311d47c152 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveTxQueryParamCommitTest + + + + + + + + + +

Validate sql:transaction, sql:query sql:param actions + allow for the execution of a SQL statement

+

+ + + + + + + + + + + + The query did return a Result Object that contained + 1 row as expected. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp new file mode 100644 index 0000000000..cbd6b4ba63 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + + + + +

Validate sql:transaction, sql:query sql:param actions + allow for the execution of a SQL statement

+

+ + + + + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + +

ERROR:

+ The query: + "" + returned the incorrect value for the column + . The expected + value was "" and the + actual column value was "". +

+ + + The query did return a Result Object that contained + row as expected. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf new file mode 100644 index 0000000000..2cf2b6ccfd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf @@ -0,0 +1,48 @@ + + + + + + + + + +positiveTxRollbackLifeCycleTest + + + + + +

Validate sql:transaction action LifeCycle for a rolledback transaction

+

+ + + + + + Dump LifeCycle for sql:transaction action for commited transaction +

+ + Connection.getTransactionIsolation() +
+ + Connection.setAutoCommit(false) +
+ + Connection.rollback() +
+ + Connection.setAutoCommit(true) +
+ + Connection.close() +
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp new file mode 100644 index 0000000000..6399b6ab99 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validate sql:transaction action LifeCycle for a rolledback transaction

+

+ + + + + + + + Dump LifeCycle for sql:transaction action for commited transaction +

+ + +
+
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf new file mode 100644 index 0000000000..0791d565ed --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf @@ -0,0 +1,58 @@ + + + + + + + + + +positiveTxUpdateCommitTest + + + + + + + + + +

Validate sql:transaction and sql:update actions allows for the + execution of a SQL statement and the correct number of rows is added to + the table

+

+ + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + + + The query did return a Result Object that contained + 1 rows. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp new file mode 100644 index 0000000000..2277d103b2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp @@ -0,0 +1,89 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + <%-- Number of rows to be returned by the DML statements --%> + + + + +

Validate sql:transaction and sql:update actions allows for the + execution of a SQL statement and the correct number of rows is added to + the table

+

+ + <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + + + + +

ERROR:

+ The query: + "" + returned "" + rows and the expected number of rows was + "". +

+ + + The query did return a Result Object that contained + rows. +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf new file mode 100644 index 0000000000..6e2fb22b75 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf @@ -0,0 +1,47 @@ + + + + + + + + + +positiveTxUpdateParamCommitTest + + + + + + + + + + +

Validate sql:transaction, sql:update sql:param actions + allow for the execution of a SQL statement

+

+ + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp new file mode 100644 index 0000000000..fa86069517 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp @@ -0,0 +1,71 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + <%-- Number of rows to be affected by the DML statements --%> + + + + +

Validate sql:transaction, sql:update sql:param actions + allow for the execution of a SQL statement

+

+ <%-- Clear out our table prior to starting the test --%> + + + + + + + + + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf new file mode 100644 index 0000000000..6f9bbd4101 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf @@ -0,0 +1,55 @@ + + + + + + + + + +positiveTxUpdateRollbackTest + + + + + + + + +

Validate sql:transaction and sql:update actions correctly rollback + a series of updates when a SQL Exception occurs

+

+ + + + + + + + + + + + + + An Exception was generated as Expected. +

+ + + + + + + + + The transaction was rolled back.

+ + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp new file mode 100644 index 0000000000..e24285b9f7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp @@ -0,0 +1,84 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <%-- Number of rows to be returned by the DML statements --%> + + + + +

Validate sql:transaction and sql:update actions correctly rollback + a series of updates when a SQL Exception occurs

+

+ + <%-- Clear out our table prior to starting the test --%> + + + + + <%-- Execute our update within a transaction and make sure that the update + is rolledback --%> + + + + + + + + + +

ERROR:

+ An Exception was did not occur when the query + + was executed. +

+ + + An Exception was generated as Expected. +

+ + + + + + + + + The transaction was rolled back.

+ + + Error: The SQL statement " + + " resulted in + rows being inserted. No rows should be added! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml new file mode 100644 index 0000000000..5d280327d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml @@ -0,0 +1,46 @@ + + + + + SQL Tag Library TCK Tests for JSTL1.1 + SQL Tag Library Tests + + JSTL_TAB1_ROWS + 10 + + + JSTL_TAB1_COLUMNS + 3 + + + com.sun.ts.tests.jstl.common.listeners.SQLContextListener + + + JstlDbFilter + JstlDbFilter + com.sun.ts.tests.jstl.common.filters.JstlDbFilter + + + JstlDbFilter + /* + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf new file mode 100644 index 0000000000..671493613c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeUpdateBodyContentTest + + + + + + +

Validate sql:update action throws JspException when an invalid SQL statement + is passed as body content

+ + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp new file mode 100644 index 0000000000..a189dd85e7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update action throws JspException when an invalid SQL statement + is passed as body content

+ + + + + + + + + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf new file mode 100644 index 0000000000..a71bf38ad2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeUpdateDataSourceAttributeEmptyTest + + + + + + + + +

Validate that a sql:update action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp new file mode 100644 index 0000000000..5c8b571912 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*,com.sun.ts.tests.jstl.common.wrappers.TckDataSourceWrapper" %> + + + + + <% + pageContext.setAttribute("invalidDataSource", new TckDataSourceWrapper()); + %> + + + +

Validate that a sql:update action which is passed an uninitialized DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf new file mode 100644 index 0000000000..c877655db8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf @@ -0,0 +1,31 @@ + + + + + + + + + +negativeUpdateDataSourceAttributeTest + + + + + + +

Validate that a sql:update action which is passed an invalid Datatype to the + dataSource attribute throws a JspException

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp new file mode 100644 index 0000000000..a9d93947ac --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate that a sql:update action which is passed an invalid Datatype to the + dataSource attribute throws a JspException

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf new file mode 100644 index 0000000000..595a5d78a6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +negativeUpdateDataSourceNullAttributeTest + + + + + + + + +

Validate that a sql:update action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp new file mode 100644 index 0000000000..9bc97eb2f8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate that a sql:update action which is passed an Null DataSource + Object for the dataSource attribute throws a JspException

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf new file mode 100644 index 0000000000..2939e4f653 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf @@ -0,0 +1,35 @@ + + + + + + + + + +negativeUpdateSQLAttributeTest + + + + + + + + +

Validate that a sql:update action which passes an invalid Datatype to the + sql attribute throws JspException

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp new file mode 100644 index 0000000000..ef41522a2c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp @@ -0,0 +1,50 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import= "javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("invalidSQL", new Integer("-1")); + %> + + + + +

Validate that a sql:update action which passes an invalid Datatype to the + sql attribute throws JspException

+

+ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf new file mode 100644 index 0000000000..7585d54eff --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf @@ -0,0 +1,33 @@ + + + + + + + + + +negativeUpdateSQLAttributeTest2 + + + + + + +

Validate that a sql:update action which passes an invalid SQL query to + the sql attribute throws JspException

+

+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+The root cause of Exception defined
+The expected Exception text was found in the Exception message! + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp new file mode 100644 index 0000000000..21a718f243 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate that a sql:update action which passes an invalid SQL query to + the sql attribute throws JspException

+

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp new file mode 100644 index 0000000000..2c8def12e0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp new file mode 100644 index 0000000000..30a5da379e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp new file mode 100644 index 0000000000..cc82ad1835 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> +<%@ taglib prefix="sql_rt" uri="http://java.sun.com/jstl/sql_rt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Error:

+A translation error should have occured! +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp new file mode 100644 index 0000000000..ca13b8a5a4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf new file mode 100644 index 0000000000..4b9cc3ff12 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf @@ -0,0 +1,34 @@ + + + + + + + + + +positiveUpdateBodyContentTest + + + + + + +

Validate sql:update action supports a SQL statement as body content

+ + + + + + + The correct update count was received for the + query.

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp new file mode 100644 index 0000000000..f10a44c985 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp @@ -0,0 +1,52 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*" %> + + + + + +

Validate sql:update action supports a SQL statement as body content

+ + + + + + + + + The correct update count was received for the + query.

+ + +

Error:

The query " + + " resulted in an update count of + and the + the expected update count was 0!

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf new file mode 100644 index 0000000000..be6a5fdb51 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf @@ -0,0 +1,29 @@ + + + + + + + + + +positiveUpdateDataSourceAttributeDataSourceTest + + + + + +

Validating sql:update action dataSource attribute

+

+ + + + Successfully executed sql:update action when the dataSource attribute + was passed a DataSource Object. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp new file mode 100644 index 0000000000..2b5830a5de --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + +

Validating sql:update action dataSource attribute

+

+ + + + Successfully executed sql:update action when the dataSource attribute + was passed a DataSource Object. +

+ + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf new file mode 100644 index 0000000000..934bc60124 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf @@ -0,0 +1,42 @@ + + + + + + + + + +positiveUpdateDataSourceAttributeDriverManagerTest + + + + + + + +

Validate sql:update action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp new file mode 100644 index 0000000000..022e8b3b87 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + + + +

Validate sql:update action specifying a String with + DriverManager parameters as the dataSource attribute

+

+ + + + + + + + + + + +

ERROR:

+ Could not execute the query + when using for + the dataSource attribute! The Exception that was raised is: + . +

+ + + Successfully executed the query when the dataSource attribute was + provided DriverManager parameters. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf new file mode 100644 index 0000000000..185e66c587 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf @@ -0,0 +1,39 @@ + + + + + + + + + +positiveUpdateDataSourceConfigDataSourceTest + + + + + +

Validating sql:update action and the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp new file mode 100644 index 0000000000..5106cba734 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp @@ -0,0 +1,62 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*,java.util.*" %> + + + + <%-- Configure jakarta.servlet.jsp.jstl.sql.dataSource --%> + + + + + +

Validating sql:update action and the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter specifying a DataSource Object

+

+ + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided a DataSource Object. +

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf new file mode 100644 index 0000000000..4a4b1498c2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf @@ -0,0 +1,42 @@ + + + + + + + + + +positiveUpdateDataSourceConfigDriverManagerTest + + + + + + +

Validate sql:update by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp new file mode 100644 index 0000000000..15b0ccffb8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*,java.util.*" %> + + + + + + + + +

Validate sql:update by specifying a String with DriverManager + parameters to jakarta.servlet.jsp.jstl.sql.dataSource

+

+ + + + + + + + +

ERROR:

+ Could not execute the query + when using for + jakarta.servlet.jsp.jstl.sql.dataSource! The Exception that was raised is: + . +

+ + + Successfully executed the query when jakarta.servlet.jsp.jstl.sql.dataSource + was provided DriverManager parameters. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf new file mode 100644 index 0000000000..45de19a5a2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf @@ -0,0 +1,44 @@ + + + + + + + + + +positiveUpdateDataSourceConfigPrecedenceTest + + + + + +

Validate sql:update action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + + + + + + + + + The dataSource attribute did take precedence over + jakarta.servlet.jsp.jstl.sql.dataSource. The query executed without + an error. +

+ + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp new file mode 100644 index 0000000000..bd7a7f2671 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validate sql:update action that the dataSource attribute takes + precedence over the jakarta.servlet.jsp.jstl.sql.dataSource + configuration parameter

+

+ + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + + +

ERROR:

+ jakarta.servlet.jsp.jstl.sql.dataSource did take + precedence over the dataSource attribute! + The Exception that was raised is: + . +

+ + + The dataSource attribute did take precedence over + jakarta.servlet.jsp.jstl.sql.dataSource. The query executed without + an error. +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf new file mode 100644 index 0000000000..0540dc5495 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf @@ -0,0 +1,33 @@ + + + + + + + + + +positiveUpdateNoRowsResultTest + + + + + + +

Validate sql:update action var attribute equals 0 if no rows were affected by the SQL statement

+ + + + + + + No rows were affected by the query as expected.

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp new file mode 100644 index 0000000000..2acef3471e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp @@ -0,0 +1,51 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*" %> + + + + + +

Validate sql:update action var attribute equals 0 if no rows were affected by the SQL statement

+ + + + + + + + + No rows were affected by the query as expected.

+ + + Error: The query " + + " resulted in an update count of + and the + the expected update count was 0!

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf new file mode 100644 index 0000000000..8e4a5a3ea6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf @@ -0,0 +1,47 @@ + + + + + + + + + +positiveUpdateNoVarAttributeTest + + + + + + + + + +

Validate sql:update action does not require the var attribute + inorder to execute a SQL Statement

+

+ + + + + + + + + + + + + + + The query did successfully insert + 1 row(s). +

+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp new file mode 100644 index 0000000000..5d75ae52df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <% + pageContext.setAttribute("key", new Integer("1")); + %> + <%-- Number of rows to be returned by the DML statements --%> + + + + +

Validate sql:update action does not require the var attribute + inorder to execute a SQL Statement

+

+ + <%-- Clear out our table prior to starting the test --%> + + + + + <%-- Insert a row an then validate the row was added to the table --%> + + + + + + + + +

ERROR:

+ The query: + "" + did not insert the row(s) as expected. +

+ + + The query did successfully insert + row(s). +

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf new file mode 100644 index 0000000000..e4a90535a3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf @@ -0,0 +1,40 @@ + + + + + + + + + +positiveUpdateRowsResultTest + + + + + + +

Validate sql:update action var attribute equals the number of rows affected by the SQL statement

+ + + + + + +

Validate sql:update action var attribute equals the number of rows affected by the SQL statement

+ + + + + + The SQL statement returned the correct update count of + 1.

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp new file mode 100644 index 0000000000..44b20189c8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp @@ -0,0 +1,66 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.lang.Integer" %> + + + + + + +

Validate sql:update action var attribute equals the number of rows affected by the SQL statement

+ + <%-- Clear out our table and insert one row prior to starting the test --%> + + + + + + + + + + +

Validate sql:update action var attribute equals the number of rows affected by the SQL statement

+ + + + + + + + The SQL statement returned the correct update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf new file mode 100644 index 0000000000..825bb3c76b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf @@ -0,0 +1,36 @@ + + + + + + + + + +positiveUpdateSQLAttributeTest + + + + + + + + +

Validate sql:update action sql attribute will execute a SQL statement

+ + + + + + The SQL statement executed correctly and returned the correct + update count of 1 + .

+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp new file mode 100644 index 0000000000..19fb989cd0 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + <%-- Number of rows to be returned by the DML statements --%> + + + + <%-- Clear out our table and insert one row prior to starting the test --%> + + + + + + + + + +

Validate sql:update action sql attribute will execute a SQL statement

+ + + + + + The SQL statement executed correctly and returned the correct + update count of + .

+ + + Error: The SQL statement " + + " resulted in an update count of + and the + the expected update count was + !

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf new file mode 100644 index 0000000000..aa4914f2a6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf @@ -0,0 +1,45 @@ + + + + + + + + + +positiveUpdateScopeAttributeTest + + + + + + +

Validating sql:update action scope attributes

+ + + riPage found in page scope.
+ + + + rePage found in page scope.
+ + + + reSession found in session scope.
+ + + + reRequest found in request scope.
+ + + + + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp new file mode 100644 index 0000000000..9138fcb1b8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp @@ -0,0 +1,68 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.util.*" %> + + + + + +

Validating sql:update action scope attributes

+ + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + <%=((Properties)pageContext.getAttribute("sqlProps",PageContext.APPLICATION_SCOPE)).getProperty("Delete_NoRows_Query") %> + + + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf new file mode 100644 index 0000000000..734a2ea565 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf @@ -0,0 +1,26 @@ + + + + + + + + + +positiveUpdateVarAttributeTest + + + + + +

Validating sql:update action var attribute is of type java.lang.Integer

+ + + + updateCount2 is of type java.lang.Integer
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp new file mode 100644 index 0000000000..e3d53d5cc2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="sql" uri="jakarta.tags.sql" %> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.sql.*, java.lang.Integer" %> + + + + + +

Validating sql:update action var attribute is of type java.lang.Integer

+ + + + + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt new file mode 100644 index 0000000000..a9dfdb7087 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt @@ -0,0 +1,51 @@ +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +Simple_Select_Query= SELECT * FROM jstl_tab1 +Select_NoRows_Query= SELECT * FROM jstl_tab1 WHERE idNum = -9999 +Select_Jstl_Tab1_OneRow_Query= SELECT * FROM jstl_tab1 where idNum = 1 +Select_Jstl_Tab1_By_Id_Query= SELECT * FROM jstl_tab1 ORDER BY idNum +Select_Jstl_Tab1_Using_Param_Query= SELECT * FROM jstl_tab1 WHERE idNum = ? +Select_Jstl_Tab2_Using_Param_Query= SELECT idNum, lastName FROM jstl_tab2 WHERE idNum = ? + +Update_Jstl_Tab2_Using_Param_Query= UPDATE jstl_tab2 SET lastName= ? WHERE idNum = ? + +Delete_NoRows_Query= DELETE FROM jstl_tab2 WHERE idNum = -9999 +Delete_AllRows_Query= DELETE FROM jstl_tab2 + +Insert_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (1, {d '1961-08-30'}, 'Clark', 'Kent', 1, 4.5) +Insert2_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, {d '1980-12-30'}, 'Fred', 'Flinstone', 2, 4.5) +Insert3_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (3, {d '1961-01-01'}, 'Scooby', 'Doo', 4, 4.5) +Insert4_Row_Query= INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (4, {d '1990-03-15'}, 'Bruce', 'Wayne', 3, 4.5) +Delete_Jstl_Tab2_Using_Param_Query=DELETE FROM jstl_tab2 where idNum = ? +Failed_Insert_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (2, '1992-02-03'}, NULL,NULL, 2, 4.5) +Select_Jstl_Tab2_AllRows_Query=SELECT * from jstl_tab2 +Invalid_SQL_Query=This Will Fail on Any RDBMS I Hope! +Select_Jstl_Tab1_MultiParam_Query=SELECT idNum, firstName, lastName from jstl_tab1 where idNum= ? and lastName = ? +Delete_Jstl_Tab2_MultiParam_Query=DELETE FROM jstl_tab2 where idNum = ? and lastName = ? +Select_Jstl_Tab3_Date_Query=SELECT * from jstl_tab3 where aDate= ? +Select_Jstl_Tab3_Time_Query=SELECT * from jstl_tab3 where aTime= ? +Select_Jstl_Tab3_Timestamp_Query=SELECT * from jstl_tab3 where aTimestamp= ? +Insert_Jstl_Tab3_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Date_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, ?, {t '20:20:20'}, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Time_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, ?, {ts '2001-08-30 20:20:20'}) +Insert_Jstl_Tab3_Timestamp_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(1, {d '2001-08-30'}, {t '20:20:20'}, ?) +Delete_Jstl_Tab3_AllRows_Query= DELETE FROM jstl_tab3 + +Insert_Jstl_Tab3_Null_Query=INSERT INTO jstl_tab3(idNum, aDate, aTime, aTimestamp) VALUES(99, null, null, null) +Select_Jstl_Tab2_NullParam_Query= SELECT * FROM jstl_tab2 WHERE rank = ? +Insert_Jstl_Tab2_Null_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, null) +Insert_Jstl_Tab2_NullParam_Query=INSERT INTO jstl_tab2(idNum, dob, firstName, lastName, rank, rating) VALUES (5, {d '1970-07-04'}, 'Peter', 'Parker', 5, ?) diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml new file mode 100644 index 0000000000..4d4c2b3fb8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xcwo_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp new file mode 100644 index 0000000000..da3fb2412e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp new file mode 100644 index 0000000000..5d5ec79c82 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Body content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp new file mode 100644 index 0000000000..6d369a47c7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body improperly processed.
+
+ + Body content improperly processed.
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp new file mode 100644 index 0000000000..0534df3a2c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Body content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf new file mode 100644 index 0000000000..a5754bd29c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf @@ -0,0 +1,22 @@ + + + + + + + +negativeCWOWhenSelectFailureTest + + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp new file mode 100644 index 0000000000..0a6c3dbd1d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + Body content improperly processed.
+
+
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp new file mode 100644 index 0000000000..26b4f95425 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body content improperly processed.
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf new file mode 100644 index 0000000000..378ab13811 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf @@ -0,0 +1,59 @@ + + + + + + +positiveCWOTest + + + + + + + Body content properly processed.
+ + + + + + + + + Body content properly proccessed.
+ + + + + + + + + + + + + + + Body content properly processed.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp new file mode 100644 index 0000000000..265edf91ce --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp @@ -0,0 +1,86 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + a-text + + + + + + + + Body content properly processed.
+
+ + Body content improperly proccessed.
+
+
+ + + + + Body content improperly processed.
+
+ + Body content properly proccessed.
+
+ + Otherwise body content improperly processed.
+
+
+ + + + + Body content improperly processed.
+
+
+ + + + + Body content improperly processed.
+
+ + Body content improperly processed.
+
+ + Body content properly processed.
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf new file mode 100644 index 0000000000..8757e69b15 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf @@ -0,0 +1,23 @@ + + + + + + +positiveCWOWhiteSpaceTest + + + + + + + Body content properly processed.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp new file mode 100644 index 0000000000..596064d519 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + a-text + + + + + + + + Body content properly processed.
+
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml new file mode 100644 index 0000000000..7682fdfe60 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xforeach_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf new file mode 100644 index 0000000000..fa15a2b392 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf @@ -0,0 +1,21 @@ + + + + + + + +negativeForEachSelectFailureTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp new file mode 100644 index 0000000000..7fa5aa6cf2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + Body Content improperly processed.
+
+
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp new file mode 100644 index 0000000000..13095dde82 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Body Content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf new file mode 100644 index 0000000000..c742097a44 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf @@ -0,0 +1,9 @@ + +positiveItemsBeginTest + + + btext6 + btext7 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp new file mode 100644 index 0000000000..72fd6d0ba8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + btext3 + btext4 + btext5 + btext6 + btext7 + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp new file mode 100644 index 0000000000..6282e22ba7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="jakarta.tags.xml" prefix="x" %> + + + btext1 + btext2 + btext3 + btext4 + btext5 + btext6 + btext7 + + + + Test FAILED + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf new file mode 100644 index 0000000000..4b3d132ef2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf @@ -0,0 +1,11 @@ + +positiveItemsEndTest + + + btext1 + btext2 + btext3 + btext4 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp new file mode 100644 index 0000000000..beca51499a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + btext3 + btext4 + btext5 + btext6 + btext7 + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp new file mode 100644 index 0000000000..38aeccadc5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Body content improperly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf new file mode 100644 index 0000000000..0475ed62a9 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf @@ -0,0 +1,23 @@ + + + + + + +positiveForEachSelectTest + + + + + Body content should be processed twice.
+ + Body content correctly processed.
+ + Body content correctly processed.
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp new file mode 100644 index 0000000000..26a3ddec05 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + + + + + Body content should be processed twice.
+ + Body content correctly processed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf new file mode 100644 index 0000000000..ec11e453d6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf @@ -0,0 +1,11 @@ + +positiveItemsStepTest + + + btext1 + btext3 + btext5 + btext7 + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp new file mode 100644 index 0000000000..b9b2d6d49c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + btext3 + btext4 + btext5 + btext6 + btext7 + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf new file mode 100644 index 0000000000..1316794b60 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf @@ -0,0 +1,11 @@ + +positiveVarStatusTest + + + rstatus is of type:java.lang.String + rstatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ rstatus is of type jakarta.servlet.jsp.jstl.core.LoopTagStatus
+ rstatus not found in specified scope:page.
+ + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp new file mode 100644 index 0000000000..38fc0a3be7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp @@ -0,0 +1,40 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + pageContext.setAttribute("rstatus", "rval"); + %> + + + btext1 + btext2 + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf new file mode 100644 index 0000000000..1943fe4154 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf @@ -0,0 +1,29 @@ + + + + + + + +positiveVarForEachTest + + + + + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + iter is of type java.lang.Object
+ btext1
+ + iter is of type java.lang.Object
+ btext2
+ + iter correctly removed after action completed + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp new file mode 100644 index 0000000000..e07a08b3d4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + btext1 + btext2 + + + + + The type of iter in this case is a node-set --> java.lang.Object
+ Two iterations should occur.
+ + + +
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml new file mode 100644 index 0000000000..c349364b51 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xif_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp new file mode 100644 index 0000000000..e5f9c9b9c7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp new file mode 100644 index 0000000000..4a92e93ac1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf new file mode 100644 index 0000000000..6d526c4ebb --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf @@ -0,0 +1,21 @@ + + + + + + + +negativeSelectFailureTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp new file mode 100644 index 0000000000..0270300764 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp new file mode 100644 index 0000000000..393a31b9fd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf new file mode 100644 index 0000000000..bff1bc5612 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf @@ -0,0 +1,36 @@ + + + + + + + +positiveIfScopeTest + + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp new file mode 100644 index 0000000000..2556f54767 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + + + Shouldn't be displayed + + + + Shouldn't be displayed + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf new file mode 100644 index 0000000000..e7f8cb50c1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf @@ -0,0 +1,24 @@ + + + + + + +positiveIfSelectTest + + + + + +

XPath expression will evaluate to true, body content should be displayed:
+ + Test PASSED: Element with attr attribute exists.
+ +
XPath expression will evaluate to false, body content should not be displayed:
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp new file mode 100644 index 0000000000..f9def73529 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + +

XPath expression will evaluate to true, body content should be displayed:
+ + Test PASSED: Element with attr attribute exists.
+
+
XPath expression will evaluate to false, body content should not be displayed:
+ + Test FAILS if this is displayed.
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf new file mode 100644 index 0000000000..d12a4ac0f5 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf @@ -0,0 +1,45 @@ + + + + + + + +positiveIfVarTest + + + + + XPath expression will evaluate to true, exported var should evaluate to true.
+ Body content should be processed.
+ + XPath expression evaluated to true.
+ + rtResult is of type java.lang.Boolean
+ Var is: true

+ + XPath expression will evaluate to false, exported var should evaluate to false.
+ Body content should be not be processed.
+ + rtResult is of type java.lang.Boolean
+ Var is: false

+ + + If tag with an empty body and var is specified.
+ XPath expression will evaluated to true, exported var should evaluate to true.
+ + retResult is of type java.lang.Boolean
+ Var is: true

+ + If tag with an empty body and var is specified.
+ XPath expression will evaluate to false, exported var should evaluated to false.
+ + refResult is of type java.lang.Boolean
+ Var is: false

+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp new file mode 100644 index 0000000000..03dfc13237 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp @@ -0,0 +1,59 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + XPath expression will evaluate to true, exported var should evaluate to true.
+ Body content should be processed.
+ + XPath expression evaluated to true.
+
+ + Var is:

+ + XPath expression will evaluate to false, exported var should evaluate to false.
+ Body content should be not be processed.
+ + XPath expression evaluated to true.
+
+ + Var is:

+ + + If tag with an empty body and var is specified.
+ XPath expression will evaluated to true, exported var should evaluate to true.
+ + + Var is:

+ + If tag with an empty body and var is specified.
+ XPath expression will evaluate to false, exported var should evaluated to false.
+ + + Var is:

+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml new file mode 100644 index 0000000000..f935ff619c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml @@ -0,0 +1,30 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_bindings_web + + initBinding + initBinding + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf new file mode 100644 index 0000000000..6f4ed4533e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf @@ -0,0 +1,41 @@ + + + + + + + +positiveXPathVariableBindingsTest + + + + + + + + + + + + + findAttribute: foundit
+ Page scope: page
+ Request scope: req
+ Session scope: sess
+ Application scope: appl
+ Init param: initBinding
+ Request param: RequestParameter1
+ Cookie: CookieFound
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp new file mode 100644 index 0000000000..0490c61033 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp @@ -0,0 +1,51 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + <%-- TEST INIT --%> + + + + + + <%-- END TEST INIT --%> + <%-- removed $header:reqheader JSTL RI bug 5018764 --%> + + findAttribute:
+ Page scope:
+ Request scope:
+ Session scope:
+ Application scope:
+ Init param:
+ Request param:
+ Cookie:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml new file mode 100644 index 0000000000..dcfb36022f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml @@ -0,0 +1,26 @@ + + + ]> + + + + &external; + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml new file mode 100644 index 0000000000..3b46c9d6fe --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_parse_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf new file mode 100644 index 0000000000..acebe3b64c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf @@ -0,0 +1,24 @@ + + + + + + + +negativeParseDocNullEmptyTest + + + +
+ + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ + + + The expected Exception jakarta.servlet.jsp.JspException was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp new file mode 100644 index 0000000000..5dde1dbf4b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + +
+ +
+
+ + + + + +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp new file mode 100644 index 0000000000..e43ce4142e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp new file mode 100644 index 0000000000..3ba2285d69 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp new file mode 100644 index 0000000000..61dbd27e48 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf new file mode 100644 index 0000000000..8eb7f60ac8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf @@ -0,0 +1,26 @@ + + + + + + + +positiveParseFilterNullTest + + + + + + Non-Filtered Results (both should yield 'xmltext'):
+ 'Attr' attribute present: xmltext
+ Selection of test element: xmltext
+ + Filter attribute was provided a null value, there should be no
+ change in the displayed results (both should yield 'xmltext'):
+ 'Attr' attribute present: xmltext
+ Selection of test element: xmltext
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp new file mode 100644 index 0000000000..f64dc3e258 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Non-Filtered Results (both should yield 'xmltext'):
+ 'Attr' attribute present:
+ Selection of test element:
+ + Filter attribute was provided a null value, there should be no
+ change in the displayed results (both should yield 'xmltext'):
+ 'Attr' attribute present:
+ Selection of test element:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf new file mode 100644 index 0000000000..d2e6e49c9f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf @@ -0,0 +1,36 @@ + + + + + + + + +positiveParseFilterTest + + + + + + + In all cases, the result of the filtered select will be 'xmlText'
+
+ Filter an XML document provided as a String:
+ + Filtered Select: xmltext
+ + Filter an XML document provided as a Reader:
+ + Filtered Select: xmltext
+ + Filter an XML document provided as a body content:
+ + Filtered Select: xmltext
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp new file mode 100644 index 0000000000..2aed30e110 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp @@ -0,0 +1,59 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="com.sun.ts.tests.jstl.common.filters.SimpleXmlFilter,org.xml.sax.XMLFilter,java.io.Reader,java.io.StringReader" %> + + + <% + // Set up a reader + Reader r = new StringReader("xmltext"); + pageContext.setAttribute("eReader" , r); + Reader rt = new StringReader("xmltext"); + pageContext.setAttribute("rReader" , rt); + + // Setup the filter. + SimpleXmlFilter filter = new SimpleXmlFilter(); + pageContext.setAttribute("fil", filter); + %> + + + In all cases, the result of the filtered select will be 'xmlText'
+
+ Filter an XML document provided as a String:
+ + Filtered Select:
+ + Filter an XML document provided as a Reader:
+ + Filtered Select:
+ + Filter an XML document provided as a body content:
+ + + + Filtered Select:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf new file mode 100644 index 0000000000..7a3aaef0be --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positiveParseNoDTDValidationTest + + + + No parsing exception shoud occur. Select should yield 'DATA':
+ + DATA
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp new file mode 100644 index 0000000000..919fcb7955 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + No parsing exception shoud occur. Select should yield 'DATA':
+ + + + + ]> + + DATA + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf new file mode 100644 index 0000000000..2813dc786d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf @@ -0,0 +1,34 @@ + + + + + + + +positiveParseScopeDomTest + + + + + + + + + riPageText found in page scope.
+ + rePageText found in page scope.
+ + reRequestText found in request scope.
+ + reSessionText found in session scope.
+ + reApplicationText found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp new file mode 100644 index 0000000000..280c8aea25 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf new file mode 100644 index 0000000000..cc3e14e859 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf @@ -0,0 +1,34 @@ + + + + + + + +positiveParseScopeTest + + + + + + + + + riPageText found in page scope.
+ + rePageText found in page scope.
+ + reRequestText found in request scope.
+ + reSessionText found in session scope.
+ + reApplicationText found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp new file mode 100644 index 0000000000..9a3b208c3f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf new file mode 100644 index 0000000000..d7861c7f3a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf @@ -0,0 +1,30 @@ + + + + + + + +positiveParseSystemIdTest + + + + + + + Result of select against parsed document should be: 'Entity Resolved':
+ + Entity Resolved
+ + XML Document provided as text to body of parse:
+ Result of select against parsed document should be: 'Entity Resolved':
+ + Entity Resolved
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp new file mode 100644 index 0000000000..b7febeb5d4 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp @@ -0,0 +1,48 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + Result of select against parsed document should be: 'Entity Resolved':
+ +
+ + XML Document provided as text to body of parse:
+ Result of select against parsed document should be: 'Entity Resolved':
+ + + + ]> + + &external; + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf new file mode 100644 index 0000000000..71546ab588 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positiveParseVarDomTest + + + + + + Exported var: rdom1 is of type org.w3c.dom.Document
+ + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp new file mode 100644 index 0000000000..1c97605f80 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Exported var: + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf new file mode 100644 index 0000000000..1203e1da96 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf @@ -0,0 +1,22 @@ + + + + + + + +positiveParseVarTest + + + + + + Exported var: rdoc1 is of type java.lang.Object
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp new file mode 100644 index 0000000000..65b88f8d88 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + Exported var: + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp new file mode 100644 index 0000000000..97bf84f652 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="jakarta.tags.xml" prefix="x" %> +<%@ taglib uri="jakarta.tags.core" prefix="c" %> + +<%-- Validate that the xml attribute is still present and can be + used in JSTL 1.1 based tag libraries. --%> + +<% + String xml = "Test PASSED"; + pageContext.setAttribute("xml", xml); +%> + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf new file mode 100644 index 0000000000..26ebf9b6a1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf @@ -0,0 +1,20 @@ + + + + + + + +positiveParseXmlBodyTest + + + + + + Doc: xmltext
+ Dom: xmltext
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp new file mode 100644 index 0000000000..dcca37453c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + xmltext + + + xmltext + + Doc:
+ Dom:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf new file mode 100644 index 0000000000..0cf99bfe91 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf @@ -0,0 +1,30 @@ + + + + + + + + +positiveParseXmlInputTest + + + + + + Parse String:
+ + xmltext +
+ + Parse Reader:
+ + xmltext +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp new file mode 100644 index 0000000000..84db02ef8b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.io.Reader,java.io.StringReader" %> + + xmltext"/> + <% + Reader r = new StringReader("xmltext"); + pageContext.setAttribute("eReader" , r); + Reader rt = new StringReader("xmltext"); + pageContext.setAttribute("rReader" , rt); + %> + + + Parse String:
+ + +
+ + Parse Reader:
+ + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml new file mode 100644 index 0000000000..13e45ad762 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml @@ -0,0 +1,21 @@ + + + + Entity Resolved + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml new file mode 100644 index 0000000000..2123e24092 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_types_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf new file mode 100644 index 0000000000..14a2252586 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf @@ -0,0 +1,34 @@ + + + + + + + +positiveJavaToXPathTypesTest + + + + + + + + + Node-set variable: text from first node set
+ Node-set variable: text from first node set
+ Boolean variable: true
+ Integer variable: 1
+ String variable: name + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp new file mode 100644 index 0000000000..9f898ea9df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp @@ -0,0 +1,61 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + <% + Integer n = new Integer(1); + Boolean b = new Boolean(true); + pageContext.setAttribute("jInteger", n); + pageContext.setAttribute("jBoolean", b); + %> + + + + + + text from first node set + + + + + text from seconde node set + + + + + + + + Node-set variable:
+ Node-set variable:
+ Boolean variable:
+ Integer variable:
+ String variable: +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf new file mode 100644 index 0000000000..6616f7536e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf @@ -0,0 +1,35 @@ + + + + + + + +positiveXPathToJavaTypesTest + + + + + XPath expression: boolean(/Server/GlobalNamingResources/ResourceParams) - Result should be of type Boolean
+ + Result: reBool is of type java.lang.Boolean

+ XPath expression: count(/Server/GlobalNamingResources/ResourceParams) - Result should be of type Number
+ + Result: reNum is of type java.lang.Number

+ XPath expression: string($doc/*) - Result should be of type String
+ + Result: reStr is of type java.lang.String

+ XPath expression: $doc//parameter - Result should be a Node-Set of type java.lang.Object
+ + Result: reNode is of type java.lang.Object

+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp new file mode 100644 index 0000000000..d5a26ad41b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp @@ -0,0 +1,65 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + factory + some.factory + + + pathname + users.xml + + + + + + + + XPath expression: boolean(/Server/GlobalNamingResources/ResourceParams) - Result should be of type Boolean
+ + Result:
+ XPath expression: count(/Server/GlobalNamingResources/ResourceParams) - Result should be of type Number
+ + Result:
+ XPath expression: string($doc/*) - Result should be of type String
+ + Result:
+ XPath expression: $doc//parameter - Result should be a Node-Set of type java.lang.Object
+ + Result:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml new file mode 100644 index 0000000000..dbd0333b0c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xout_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf new file mode 100644 index 0000000000..c25455cfb2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf @@ -0,0 +1,20 @@ + + + + + + + +negativeOutSelectFailureTest + + + + + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp new file mode 100644 index 0000000000..c8946bfe18 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp new file mode 100644 index 0000000000..8fc41651cd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf new file mode 100644 index 0000000000..3d8054abf1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf @@ -0,0 +1,34 @@ + + + + + + + +positiveOutEscXmlTest + + + + + escapeXml == true: + < > & ' " + + escapeXml == false: + < > & ' " +
+ escapeXml == not specified: + < > & ' " +
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp new file mode 100644 index 0000000000..d30f224a95 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + & ' "]]> + + + + + escapeXml == true: + escapeXml == false:
+ escapeXml == not specified:
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf new file mode 100644 index 0000000000..d7d0dfba19 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf @@ -0,0 +1,16 @@ + + + + + + + +positiveOutSelectTest + + + XPath result should be 'text': text
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp new file mode 100644 index 0000000000..6ba1bf95df --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + + + + XPath result should be 'text':
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml new file mode 100644 index 0000000000..a290127b68 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xset_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp new file mode 100644 index 0000000000..f7c6cc3a5f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf new file mode 100644 index 0000000000..85baf2cd34 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf @@ -0,0 +1,20 @@ + + + + + + + +negativeSetSelectFailureTest + + + + + + The expected Exception <strong>jakarta.servlet.jsp.JspException</strong> was thrown! + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp new file mode 100644 index 0000000000..28638c2f31 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp new file mode 100644 index 0000000000..f62b920d64 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp new file mode 100644 index 0000000000..e7f1e319d2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf new file mode 100644 index 0000000000..72b266cea1 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf @@ -0,0 +1,35 @@ + + + + + + + +positiveSetScopeTest + + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp new file mode 100644 index 0000000000..e3ab0a21c3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + text + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf new file mode 100644 index 0000000000..c2fd97cee6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf @@ -0,0 +1,21 @@ + + + + + + + +positiveSetSelectVarTest + + + + + + xResult should evaluated to 'text': text
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp new file mode 100644 index 0000000000..c3a14df33d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + text + + + + + + xResult should evaluated to 'text':
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml new file mode 100644 index 0000000000..13f8d9f09b --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xformparam_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl new file mode 100644 index 0000000000..890604583d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl @@ -0,0 +1,27 @@ + + + + + DEFAULT + 8pt + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp new file mode 100644 index 0000000000..5829736d44 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + REPLACE + 8pt + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp new file mode 100644 index 0000000000..bf82a9edf2 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + REPLACE + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp new file mode 100644 index 0000000000..ee81a79184 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + REPLACE + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml new file mode 100644 index 0000000000..b34713aeda --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml @@ -0,0 +1,26 @@ + + + ]> + + + + &external; + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl new file mode 100644 index 0000000000..09ae3a2b01 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl @@ -0,0 +1,32 @@ + + + + + + + + + + + + Node is of type: + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml new file mode 100644 index 0000000000..6d9ff3c4bd --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml @@ -0,0 +1,26 @@ + + + + + XML Tag Library TCK Tests for JSTL + jstl_xml_xform_web + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf new file mode 100644 index 0000000000..947aeef01a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf @@ -0,0 +1,31 @@ + + + + + + + +negativeTransformXmlXsltNullEmptyTest + + + + Xml attribute is null:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ Xml attribute is Empty:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ Xslt attribute is null:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ Xstl attribute is Empty:
+ + + The expected Exception jakarta.servlet.jsp.JspException was thrown!
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp new file mode 100644 index 0000000000..d642b82bea --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + Xml attribute is null:
+ + + +
+ Xml attribute is Empty:
+ + + +
+ Xslt attribute is null:
+ + + +
+ Xstl attribute is Empty:
+ + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl new file mode 100644 index 0000000000..890604583d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl @@ -0,0 +1,27 @@ + + + + + DEFAULT + 8pt + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp new file mode 100644 index 0000000000..bea6371757 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp new file mode 100644 index 0000000000..eff499de46 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + THIS SHOULD BE REPLACED + + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp new file mode 100644 index 0000000000..3690cdd6e8 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + +
+ + + + + + ]> + + &external; + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf new file mode 100644 index 0000000000..af6d7d9b07 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf @@ -0,0 +1,25 @@ + + + + + + + + +positiveTransformResultTest + + + + + + + + Result:
+ transform one text + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp new file mode 100644 index 0000000000..eedcd4ba2f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="javax.xml.transform.*,javax.xml.transform.stream.*,java.io.*" %> + + + + <% + ByteArrayOutputStream eBoa = new ByteArrayOutputStream(128); + ByteArrayOutputStream rBoa = new ByteArrayOutputStream(128); + Result eResult = new StreamResult(eBoa); + Result rResult = new StreamResult(rBoa); + pageContext.setAttribute("eResult", eResult); + pageContext.setAttribute("rResult", rResult); + %> + + + + Result:
+ <% + StreamResult postResult = (StreamResult) pageContext.getAttribute("rResult"); + ByteArrayOutputStream os = (ByteArrayOutputStream) postResult.getOutputStream(); + out.println(os.toString("ISO-8859-1")); + %> +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf new file mode 100644 index 0000000000..dc98468a10 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf @@ -0,0 +1,37 @@ + + + + + + + +positiveTransformScopeTest + + + + + + + + + + + riPage found in page scope.
+ + rePage found in page scope.
+ + reRequest found in request scope.
+ + reSession found in session scope.
+ + reApplication found in application scope.
+ + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp new file mode 100644 index 0000000000..d9be60188a --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf new file mode 100644 index 0000000000..739aaac570 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf @@ -0,0 +1,23 @@ + + + + + + + +positiveTransformVarTest + + + + + + + + trans2 is of type org.w3c.dom.Document
+ + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp new file mode 100644 index 0000000000..4a6cbf80f6 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp new file mode 100644 index 0000000000..fb1402b16d --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + <%-- Validate that the xmlSystemId and xml attributes are still valid --%> + <%-- Result should have 'Entity Resolved' wrapped by <h4> elements: --%> +
+ + <%-- Result should have 'Entity Resolved' wrapped by <h4> elements: --%> + + + + + ]> + + &external; + +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp new file mode 100644 index 0000000000..6f42d30628 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + <%-- The transform action must be able to parse XML provided + as body content and transform the parsed result using + the specified stylesheet. --%> + + + element text + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp new file mode 100644 index 0000000000..743245b66c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp @@ -0,0 +1,84 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.io.*,javax.xml.transform.*,javax.xml.transform.stream.*" %> + + <%-- START TEST INITIALIZATION --%> + + + + + <% + // init reader + Reader eXmlReader = new StringReader((String) pageContext.getAttribute("xmlDoc")); + Reader rXmlReader = new StringReader((String) pageContext.getAttribute("xmlDoc")); + + // init javax.xml.transform.Source + Source eSource = new StreamSource( + application.getResourceAsStream("/simple.xml")); + Source rSource = new StreamSource( + application.getResourceAsStream("/simple.xml")); + pageContext.setAttribute("eReader", eXmlReader); + pageContext.setAttribute("rReader", rXmlReader); + pageContext.setAttribute("eSource", eSource); + pageContext.setAttribute("rSource", rSource); + %> + + + <%-- STOP TEST INITIALIZATION --%> + + <%-- The xml attribute must be able to accept the following + input sources: + - String + - Reader + - javax.xml.transform.Source + - Object exported by: + + x:parse + + x:set + + x:transform --%> + In all cases the resulting text should be wrapped by <h4> elements:
+ Input from String:
+
+ + Input from Reader:
+
+ + Input from javax.xml.transform.Source:
+
+ + Input from result of x:parse action:
+
+ + Input from result of x:set action:
+
+ + Input from x:transform action:
+ +
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp new file mode 100644 index 0000000000..48f0e1848f --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> +<%@ page import="java.io.*,javax.xml.transform.*,javax.xml.transform.stream.*" %> + + <%-- START TEST INITIALIZATION --%> + + + <% + // init reader + Reader eXmlReader = new StringReader((String) pageContext.getAttribute("xslDoc")); + Reader rXmlReader = new StringReader((String) pageContext.getAttribute("xslDoc")); + + // init javax.xml.transform.Source + Source eSource = new StreamSource( + application.getResourceAsStream("/simple.xsl")); + Source rSource = new StreamSource( + application.getResourceAsStream("/simple.xsl")); + pageContext.setAttribute("eReader", eXmlReader); + pageContext.setAttribute("rReader", rXmlReader); + pageContext.setAttribute("eSource", eSource); + pageContext.setAttribute("rSource", rSource); + %> + <%-- END TEST INITIALIZATION --%> + + <%-- The xslt attribute must be able to accept the following + input sources: + - String + - Reader + - javax.xml.transform.Source + - Object exported by: --%> + In all cases the resulting text should be wrapped by <h4> elements:
+ Input from String:
+
+ + Input from Reader:
+
+ + Input from javax.xml.transform.Source:
+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf new file mode 100644 index 0000000000..90a4d46dc3 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf @@ -0,0 +1,32 @@ + + + + + + + +positiveTransformXsltSystemIdTest + + + + + + + Result should display node types of the provided XML document:
+ + Node is of type: element + Node is of type: text + Node is of type: element + Node is of type: text + Node is of type: text + Node is of type: element + Node is of type: text + Node is of type: element + Node is of type: text + Node is of type: text + Node is of type: text
+ + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp new file mode 100644 index 0000000000..8b44ef579e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="c" uri="jakarta.tags.core" %> +<%@ taglib prefix="x" uri="jakarta.tags.xml" %> + +<%@ taglib prefix="tck" uri="http://java.sun.com/jstltck/jstltck-util" %> + + + + + + + Result should display node types of the provided XML document:
+
+
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml new file mode 100644 index 0000000000..2e8a17b2b7 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml @@ -0,0 +1,7 @@ + + + Arbitrary Text + + D Text + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl new file mode 100644 index 0000000000..1f1a28ab9e --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl @@ -0,0 +1,28 @@ + + + + + + + +

+
+ +
diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml new file mode 100644 index 0000000000..39f1127054 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml @@ -0,0 +1,20 @@ + + + +transform one text diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl new file mode 100644 index 0000000000..419bdaaf3c --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl new file mode 100644 index 0000000000..fa20c38258 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml new file mode 100644 index 0000000000..13e45ad762 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml @@ -0,0 +1,21 @@ + + + + Entity Resolved + diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl new file mode 100644 index 0000000000..692fa11099 --- /dev/null +++ b/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl @@ -0,0 +1,28 @@ + + + + + + + + element + attribute + text +