rlubke      02/01/28 16:00:50

  Modified:    src/server/jsp-tests/jsp/engine/JspWriter/misc
                        negativeClose.jsp positiveClear.jsp
                        positiveFlush.jsp positiveGetBufferSize.jsp
                        positiveGetBufferSizeUnBuffered.jsp
                        positiveGetRemaining.jsp
                        positiveGetRemainingBufferUnset.jsp
                        positiveIsAutoFlush.jsp
  Added:       src/server/jsp-tests/jsp/engine/JspWriter/misc
                        closeValidator.jsp
  Log:
   - content push from CTS
  
  Revision  Changes    Path
  1.2       +14 -25    
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/negativeClose.jsp
  
  Index: negativeClose.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/negativeClose.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- negativeClose.jsp 4 Oct 2000 00:17:57 -0000       1.1
  +++ negativeClose.jsp 29 Jan 2002 00:00:50 -0000      1.2
  @@ -1,32 +1,21 @@
   <html>
   <title>negativeClose</title>
   <body>
  -<% /**
  +<%
  +/*
    Name : negativeClose
  - Description : We closing the stream and trying to write into the stream.
  -**/ %>
  -
  -<!-- This is to test if clear method throws IOException if stream is closed -->
  -<%@ page import="java.io.*;" %>
  -<% out.println("hello"); %>
  -<% out.close(); %>
  -<!-- To report that 'out' is null, we dont have a stream to client available -->
  -<!-- We create a file in the directory which is seen by javatest -->
  -<%! String dir; %>
  -<% String path=request.getPathTranslated(); %>
  -<% if(path!=null) {
  -                 int where=path.lastIndexOf("negativeClose"); 
  -                 dir=path.substring(0,where);
  -                 }else {
  -                      dir=System.getProperty("user.home");
  -              }  
  -                 java.io.File file=new 
java.io.File(dir+System.getProperty("file.separator")+"negativeClose.err"); 
  -                 java.io.FileWriter fw=new java.io.FileWriter(file);
  + Description : Attempt to write to the JspWriter after closing.  
  +               An Exception should be thrown, but is not caught,
  +               resulting in a HTTP 500 being sent to the client.
  + */
  + %>
  +<%
  +   try {
  +       out.close();
  +       out.println( "Arbitrary text" ); 
  +   } catch ( java.io.IOException ioe ) {
  +       application.setAttribute( "ioexception", ioe ); 
  +   }
   %>
  -
  -<!-- Now lets try to clear the stream -->
  -<% try { out.println("oops");  fw.write("no IOException"); fw.flush();fw.close();
  -}catch(java.io.IOException ioe) { %>
  -<% fw.write("we got IOException"); fw.flush();fw.close(); }%>
   </body>
   </html>
  
  
  
  1.2       +2 -1      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveClear.jsp
  
  Index: positiveClear.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveClear.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveClear.jsp 4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveClear.jsp 29 Jan 2002 00:00:50 -0000      1.2
  @@ -16,4 +16,5 @@
   <% out.clear(); %>
   <!-- expecting blank page -->
   </body>
  -</html>
  \ No newline at end of file
  +</html>
  +
  
  
  
  1.3       +2 -2      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveFlush.jsp
  
  Index: positiveFlush.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveFlush.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- positiveFlush.jsp 2 Jan 2002 20:21:34 -0000       1.2
  +++ positiveFlush.jsp 29 Jan 2002 00:00:50 -0000      1.3
  @@ -7,10 +7,10 @@
    Expected to flush the buffer to the output stream.
    **/ %>
   <!-- this is to test if flush() method works -->
  -<%
  +<% 
       int buffer = out.getBufferSize();
       out.println("hello"); 
  -    out.flush(); 
  +    out.flush();
       if ( buffer == out.getRemaining() ) {
           out.println( "Test status: PASSED" );
       } else {
  
  
  
  1.2       +9 -5      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetBufferSize.jsp
  
  Index: positiveGetBufferSize.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetBufferSize.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetBufferSize.jsp 4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveGetBufferSize.jsp 29 Jan 2002 00:00:50 -0000      1.2
  @@ -4,15 +4,19 @@
   <%
   /*
    Name : positiveGetBufferSize
  - Description : Set the buffer size,with buffer directive,then use the 
  - getBufferSize() method.
  + Description : Set the buffer size with the buffer directive,
  + then use the getBufferSize() method.
    */
    %>
   <!-- this is to test if getBufferSize method works -->
   <!-- setting buffer size to 5kb using directive -->
   <%@ page buffer="5kb" %>
   <!-- calling getBufferSize() method -->
  -<%= out.getBufferSize() %>
  -<!-- expected to return 5120 as buffer size --> 
  +<% if (out.getBufferSize() >= 5120) {%>
  +true
  +<% } else { %>
  +false
  +<% } %>
  +<!-- expected to return true --> 
   </body>
  -</html>
  \ No newline at end of file
  +</html>
  
  
  
  1.2       +2 -2      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetBufferSizeUnBuffered.jsp
  
  Index: positiveGetBufferSizeUnBuffered.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetBufferSizeUnBuffered.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetBufferSizeUnBuffered.jsp       4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveGetBufferSizeUnBuffered.jsp       29 Jan 2002 00:00:50 -0000      1.2
  @@ -5,7 +5,7 @@
   /*
    Name : positiveGetBufferSizeUnBuffered
    Description : Set the buffer directive to 'none'. 
  - Then callthe getBufferSize() method.
  + Then call the getBufferSize() method.
    */
    %>
   <!-- this is to test if getBufferSize method works with no buffer-->
  @@ -14,4 +14,4 @@
   <% out.println("got="+out.getBufferSize()); %>
   <!-- expected to return 0 as buffer is set 'none' --> 
   </body>
  -</html>
  \ No newline at end of file
  +</html>
  
  
  
  1.2       +2 -2      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetRemaining.jsp
  
  Index: positiveGetRemaining.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetRemaining.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetRemaining.jsp  4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveGetRemaining.jsp  29 Jan 2002 00:00:50 -0000      1.2
  @@ -1,9 +1,9 @@
   <%@ page buffer="5kb" %>
   <% int bufferSize = out.getBufferSize(); 
   out.flush();
  -out.print("hello: ");
  +out.print("hello:");
   int remainingSize =  out.getRemaining();
  -if ( remainingSize == (bufferSize-7) ) 
  +if ( remainingSize == (bufferSize-6) ) 
        out.print("getRemaining test Passed");
   else { 
        out.println("getRemaining Test Failed");
  
  
  
  1.2       +2 -2      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetRemainingBufferUnset.jsp
  
  Index: positiveGetRemainingBufferUnset.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveGetRemainingBufferUnset.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetRemainingBufferUnset.jsp       4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveGetRemainingBufferUnset.jsp       29 Jan 2002 00:00:50 -0000      1.2
  @@ -15,6 +15,6 @@
   <!-- using getRemaining() method to get the buffer size -->
   
   <%= out.getRemaining() %>
  -<!-- expected to return 1  -->
  +<!-- expected to return 0  -->
   </body>
  -</html>
  \ No newline at end of file
  +</html>
  
  
  
  1.2       +2 -3      
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveIsAutoFlush.jsp
  
  Index: positiveIsAutoFlush.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/positiveIsAutoFlush.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveIsAutoFlush.jsp   4 Oct 2000 00:17:57 -0000       1.1
  +++ positiveIsAutoFlush.jsp   29 Jan 2002 00:00:50 -0000      1.2
  @@ -4,8 +4,7 @@
   <%
   /*
    Name : positiveIsAutoFlush
  - Description : Set the autoflush directive to 'true' and then
  -call the isAutoFlush() method .
  + Description : Call isAutoFlush and verify the default is 'true'
   */
   %>
   <!-- this is to test positiveIsAutoFlush -->
  @@ -14,4 +13,4 @@
   <%= out.isAutoFlush() %>
   <!-- expected to return true  -->
   </body>
  -</html>
  \ No newline at end of file
  +</html>
  
  
  
  1.1                  
jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/JspWriter/misc/closeValidator.jsp
  
  Index: closeValidator.jsp
  ===================================================================
  <html>
  <title>closeValidator</title>
  <body>
  <%
      Exception exc = (Exception) application.getAttribute( "ioexception" );
      application.removeAttribute( "ioexception" );
      if ( exc != null && exc instanceof java.io.IOException ) {
          response.addHeader( "status", "Test Status=PASSED" );
      } else {
          response.addHeader( "status", "Test Status=FAILED" );
      }
  %>
  </body>
  </html>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to