rlubke 02/01/02 12:21:34
Modified: src/server/jsp-tests/jsp/engine/JspWriter/misc
positiveFlush.jsp
Log:
Enhanced test to do more than just call out.flush().
- get the buffer size of the page (out.getBufferSize())
- write data to the buffer and flush
- validate that the buffer is clean by checking
the buffer size from the first step against a call
to out.getRemaining(). The values should be equal.
Revision Changes Path
1.2 +13 -6
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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- positiveFlush.jsp 4 Oct 2000 00:17:57 -0000 1.1
+++ positiveFlush.jsp 2 Jan 2002 20:21:34 -0000 1.2
@@ -7,10 +7,17 @@
Expected to flush the buffer to the output stream.
**/ %>
<!-- this is to test if flush() method works -->
-<% out.println("hello"); %>
-<% out.flush(); %>
-
-
-
+<%
+ int buffer = out.getBufferSize();
+ out.println("hello");
+ out.flush();
+ if ( buffer == out.getRemaining() ) {
+ out.println( "Test status: PASSED" );
+ } else {
+ out.println( "Test status: FAILED" );
+ out.println( "Expected buffer size: " + buffer );
+ out.println( "Buffer size after flush: " + out.getRemaining() );
+ }
+%>
</body>
-</html>
\ No newline at end of file
+</html>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>