Author: bayard
Date: Sun Jul 12 05:02:47 2009
New Revision: 793270

URL: http://svn.apache.org/viewvc?rev=793270&view=rev
Log:
Adding a test for Bugzilla issue #39964

Added:
    
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/
    
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp
   (with props)
    
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/
    
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java
   (with props)

Added: 
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp
URL: 
http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp?rev=793270&view=auto
==============================================================================
--- 
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp
 (added)
+++ 
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp
 Sun Jul 12 05:02:47 2009
@@ -0,0 +1,5 @@
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
+<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"; prefix="str" %>
+
+<c:set var="code">sample code</c:set>
+<str:overlay var="test" start="10" end="10" 
with="${code}">12345678901234567890</str:overlay>

Propchange: 
jakarta/taglibs/proper/string/trunk/string-test/src/main/webapp/org/apache/taglibs/string/bug/Bug39964Test.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java
URL: 
http://svn.apache.org/viewvc/jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java?rev=793270&view=auto
==============================================================================
--- 
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java
 (added)
+++ 
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java
 Sun Jul 12 05:02:47 2009
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.taglibs.string.bug;
+
+import javax.servlet.jsp.*;
+import org.apache.cactus.*;
+
+public class Bug39964Test extends JspTestCase {
+
+    public void testOverlay() throws Exception {
+        String toInclude = getTestJsp(this);
+        pageContext.include(toInclude);
+
+        String test = (String) pageContext.getAttribute("test", 
PageContext.APPLICATION_SCOPE);
+
+        assertEquals("JSP set incorrect value", "1234567890sample 
code1234567890", test);
+    }
+
+     private static String getTestJsp(Object obj) {
+         String className = obj.getClass().getName();
+         String baseName = className.replace('.', '/');
+         return "/" + baseName + ".jsp";
+     }
+
+}

Propchange: 
jakarta/taglibs/proper/string/trunk/string-test/src/test/java/org/apache/taglibs/string/bug/Bug39964Test.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-h...@jakarta.apache.org

Reply via email to