Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-07-23 20:09:44 -0400
committerJoakim Erdfelt2015-07-23 20:09:44 -0400
commit4282d92f309b24e9bf4f3ae6f79b0013e909e8b3 (patch)
tree6f495da3871bbfc4538728a10802f49a30615ac5 /apache-jstl
parent07423d92e25b94fd4394a03c7b5ea87e426bc02c (diff)
downloadorg.eclipse.jetty.project-4282d92f309b24e9bf4f3ae6f79b0013e909e8b3.tar.gz
org.eclipse.jetty.project-4282d92f309b24e9bf4f3ae6f79b0013e909e8b3.tar.xz
org.eclipse.jetty.project-4282d92f309b24e9bf4f3ae6f79b0013e909e8b3.zip
Simplifying <c:catch> from taglib testcase
Diffstat (limited to 'apache-jstl')
-rw-r--r--apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java7
-rw-r--r--apache-jstl/src/test/taglibjar/META-INF/etag.tld5
-rw-r--r--apache-jstl/src/test/taglibjar/META-INF/tags/errorhandler.tag11
-rw-r--r--apache-jstl/src/test/taglibjar/META-INF/tags/errortest.tag3
-rw-r--r--apache-jstl/src/test/webapp/catch-taglib.jsp4
5 files changed, 10 insertions, 20 deletions
diff --git a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
index 6221c1d694..1f39e8a40c 100644
--- a/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
+++ b/apache-jstl/src/test/java/org/eclipse/jetty/jstl/JstlTest.java
@@ -127,9 +127,8 @@ public class JstlTest
SimpleRequest req = new SimpleRequest(baseUri);
String resp = req.getString("/catch-taglib.jsp");
System.out.println("resp = " + resp);
- assertThat("Response should be JSP processed", resp, not(containsString("<c:catch")));
- assertThat("Response should be JSP processed", resp, not(containsString("<jtest:errortest")));
- assertThat("Response", resp, containsString("[jtest:errorhandler] exception : "));
- assertThat("Response", resp, containsString("[jtest:errorhandler] exception.message : "));
+ assertThat("Response should be JSP processed", resp, not(containsString("<c:catch>")));
+ assertThat("Response should be JSP processed", resp, not(containsString("<jtest:errorhandler>")));
+ assertThat("Response", resp, not(containsString("[jtest:errorhandler] exception is null")));
}
}
diff --git a/apache-jstl/src/test/taglibjar/META-INF/etag.tld b/apache-jstl/src/test/taglibjar/META-INF/etag.tld
index 61f568c41d..de59ff05a3 100644
--- a/apache-jstl/src/test/taglibjar/META-INF/etag.tld
+++ b/apache-jstl/src/test/taglibjar/META-INF/etag.tld
@@ -10,11 +10,6 @@
<uri>org.eclipse.jetty.jstl.jtest</uri>
<tag-file>
- <name>errortest</name>
- <path>/META-INF/tags/errortest.tag</path>
- </tag-file>
-
- <tag-file>
<name>errorhandler</name>
<path>/META-INF/tags/errorhandler.tag</path>
</tag-file>
diff --git a/apache-jstl/src/test/taglibjar/META-INF/tags/errorhandler.tag b/apache-jstl/src/test/taglibjar/META-INF/tags/errorhandler.tag
index 854952bc2f..ddd44dd491 100644
--- a/apache-jstl/src/test/taglibjar/META-INF/tags/errorhandler.tag
+++ b/apache-jstl/src/test/taglibjar/META-INF/tags/errorhandler.tag
@@ -1,13 +1,12 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<c:catch var="error">
+<c:catch var="tossable">
<jsp:doBody />
</c:catch>
-
-<c:if test="${error != null}">
-[jtest:errorhandler] exception : ${error}
-[jtest:errorhandler] exception.message : ${error.message}
+<c:if test="${tossable != null}">
+[jtest:errorhandler] exception : ${tossable}
+[jtest:errorhandler] exception.message : ${tossable.message}
</c:if>
-<c:if test="${error == null}">
+<c:if test="${tossable == null}">
[jtest:errorhandler] exception is null
</c:if>
diff --git a/apache-jstl/src/test/taglibjar/META-INF/tags/errortest.tag b/apache-jstl/src/test/taglibjar/META-INF/tags/errortest.tag
deleted file mode 100644
index c41a875c0c..0000000000
--- a/apache-jstl/src/test/taglibjar/META-INF/tags/errortest.tag
+++ /dev/null
@@ -1,3 +0,0 @@
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-<c:out value="content from jtest:errortest tag"/> \ No newline at end of file
diff --git a/apache-jstl/src/test/webapp/catch-taglib.jsp b/apache-jstl/src/test/webapp/catch-taglib.jsp
index 68c7b8f50e..28f7488e2a 100644
--- a/apache-jstl/src/test/webapp/catch-taglib.jsp
+++ b/apache-jstl/src/test/webapp/catch-taglib.jsp
@@ -4,8 +4,8 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
Title: JSTL c:catch test
-<jtest:errortest>
+<jtest:errorhandler>
<fmt:parseNumber var="parsedNum" value="aaa" />
-</jtest:errortest>
+</jtest:errorhandler>
parsedNum = <c:out value="${parsedNum}"/> \ No newline at end of file

Back to the top