tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@hyperreal.org
Subject cvs commit: jakarta-tomcat/src/tests/share/tests/jsp Jsp.java jsp.properties
Date Tue, 02 Nov 1999 23:15:29 GMT
arun        99/11/02 15:15:27

  Modified:    src/tests/share/tests/jsp Tag: TOMCAT_J2EE_10F_102199
                        Jsp.java jsp.properties
  Log:
  More JSP tests
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +31 -18    jakarta-tomcat/src/tests/share/tests/jsp/Attic/Jsp.java
  
  Index: Jsp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/share/tests/jsp/Attic/Jsp.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- Jsp.java	1999/10/27 00:44:52	1.1.2.1
  +++ Jsp.java	1999/11/02 23:15:01	1.1.2.2
  @@ -1,6 +1,6 @@
   
   /*
  - * $Id: Jsp.java,v 1.1.2.1 1999/10/27 00:44:52 arun Exp $
  + * $Id: Jsp.java,v 1.1.2.2 1999/11/02 23:15:01 arun Exp $
    */
   
   /**
  @@ -47,9 +47,12 @@
   
               Enumeration testNames = tests.elements();
     
  +            boolean debugSaved = debug;
               while (testNames.hasMoreElements()) {
  -
                   String testId = (String)testNames.nextElement();
  +                String debugThis = props.getProperty("test." + testId + ".debug");
  +                if (debugThis != null)
  +                    debug = Boolean.valueOf(debugThis).booleanValue();
   
                   if (! test(testId)) {
                        status = false;
  @@ -58,6 +61,7 @@
                        msg.append("\tTest " + testId + " : " +
                            description + "\n");
                   }
  +                debug = debugSaved;
               }
           }
   
  @@ -104,8 +108,11 @@
           if (ready()) {
               try {
                   writeRequest(testId);
  -                //String response = getResponse(testId);
  +                if (this.debug) 
  +                    System.out.println("<--BEG---");
                   responseStatus = getResponse(testId, testCondition);
  +                if (this.debug)
  +                    System.out.println("---END-->");
   
               } catch (IOException ioe) {
                   ioe.printStackTrace();
  @@ -174,28 +181,18 @@
       private boolean getResponse(String testId, boolean testCondition)
       throws IOException {
           String line = null;
  -        boolean showHeader = false;
   
  -        if (this.debug) {
  -            String headerTag = props.getProperty("test." + testId + ".showHeader");
  -            if (headerTag != null)
  -                if (headerTag.trim().toLowerCase().equals("true"))
  -                    showHeader = true;
  -            System.out.println("<--------");
  -        }
           // Match the return code if defined 
           boolean returnCode = checkReturnCode(testId);
  +
  +        getServerHeader(testId);
       
           // test only the return code
           if (props.getProperty("test." + testId + ".golden") == null)
               return returnCode;
   
           // else do content matching as well
  -        StringBuffer result = getServerResponse(showHeader);
  -
  -        if (this.debug)
  -            System.out.println("-------->");
  -        //System.out.println("revResult: " + result);
  +        StringBuffer result = getServerBody();
   
           // Get the expected result from the "golden" file.
           StringBuffer expResult = getExpectedResult (testId);
  @@ -216,6 +213,7 @@
                   line = br.readLine();
               } catch (IOException ioe) {
               }
  +
               if (line != null) {
                   if (this.debug)
                       System.out.println(line);
  @@ -227,8 +225,15 @@
           return responseStatus;
       }
   
  -    private StringBuffer getServerResponse(boolean showHeader) {
  -        StringBuffer result = new StringBuffer("");
  +    private void getServerHeader(String testId) {
  +        boolean showHeader = false;
  +        if (this.debug) {
  +            String headerTag = props.getProperty("test." + testId + ".showHeader");
  +            if (headerTag != null)
  +                if (headerTag.trim().toLowerCase().equals("true"))
  +                    showHeader = true;
  +        }
  +
           String line;
           try {
               while ((line = br.readLine()) != null) {
  @@ -238,6 +243,14 @@
                   if (showHeader)
                       System.out.println(line);
               }
  +        } catch (IOException ioe) {
  +        }
  +    }
  +
  +    private StringBuffer getServerBody() {
  +        StringBuffer result = new StringBuffer("");
  +        String line;
  +        try {
               while ((line = br.readLine()) != null) {
                   if (this.debug)
                       System.out.println("\t" + line);
  
  
  
  1.1.2.4   +124 -29   jakarta-tomcat/src/tests/share/tests/jsp/Attic/jsp.properties
  
  Index: jsp.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/share/tests/jsp/Attic/jsp.properties,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- jsp.properties	1999/10/30 09:24:00	1.1.2.3
  +++ jsp.properties	1999/11/02 23:15:13	1.1.2.4
  @@ -4,14 +4,15 @@
   
   Debug:false
   
  -tests:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
  +tests:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, \
  +	22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40
   
  -test.1.request:GET /jsp/HelloWorld.jsp HTTP/1.0
  -test.1.golden: HelloWorld.txt
  +test.1.request:GET /jsp/helloWorld.jsp HTTP/1.0
  +test.1.golden: helloWorld.txt
   test.1.magnitude:true
   
  -test.2.request:GET /DoesNotExist.jsp HTTP/1.0
  -test.2.golden: MustFail.txt
  +test.2.request:GET /doesNotExist.jsp HTTP/1.0
  +test.2.golden: mustFail.txt
   test.2.magnitude:false
   
   test.3.request:GET /jsp/ HTTP/1.0
  @@ -20,77 +21,171 @@
   test.3.magnitude:true
   
   test.4.request:GET /jsp HTTP/1.0
  -test.4.golden: MustFail.txt 
  +test.4.golden: mustFail.txt 
   test.4.commect: Getting -->> HTTP/1.0 302 Found
   test.4.magnitude:false
   
   test.5.request:GET /.jsp HTTP/1.0
  -test.5.golden: MustFail.txt
  +test.5.golden: mustFail.txt
   test.5.magnitude:false
   
   test.6.request:GET /*.jsp HTTP/1.0
  -test.6.golden: MustFail.txt
  +test.6.golden: mustFail.txt
   test.6.magnitude:false
   
   test.7.request:GET *jsp HTTP/1.0
  -test.7.golden: MustFail.txt
  +test.7.golden: mustFail.txt
   test.7.magnitude:false
   
  -test.8.request:GET HelloWorld.jsp
  -test.8.golden: HelloWorld.txt
  +test.8.request:GET helloWorld.jsp
  +test.8.golden: helloWorld.txt
   test.8.magnitude:false
   
  -test.9.request:GET /jsp/HelloWorld.jsp HTTP
  -test.9.golden: HelloWorld.txt
  +test.9.request:GET /jsp/helloWorld.jsp HTTP
  +test.9.golden: helloWorld.txt
   test.9.magnitude:false
   
  -test.10.request:GET /jsp/HelloWorld.jsp 1.0
  -test.10.golden: HelloWorld.txt
  +test.10.request:GET /jsp/helloWorld.jsp 1.0
  +test.10.golden: helloWorld.txt
   test.10.magnitude:false
   
  -test.11.request:GET /jsp/HelloWorld.jsp /1.0
  -test.11.golden: HelloWorld.txt
  +test.11.request:GET /jsp/helloWorld.jsp /1.0
  +test.11.golden: helloWorld.txt
   test.11.showHeader:true
   test.11.magnitude:false
   
  -test.12.request:GET /jsp/HelloWorld.jsp?????? HTTP/1.0
  -test.12.golden: HelloWorld.txt
  +test.12.request:GET /jsp/helloWorld.jsp?????? HTTP/1.0
  +test.12.golden: helloWorld.txt
   test.12.showHeader:true
   test.12.magnitude:true
   
  -test.13.request:GET /jsp/HelloWorld.jsp?a=b&c=d HTTP/1.0
  -test.13.golden: HelloWorld.txt
  +test.13.request:GET /jsp/helloWorld.jsp?a=b&c=d HTTP/1.0
  +test.13.golden: helloWorld.txt
   test.13.showHeader:true
   test.13.magnitude:true
   
  -test.14.request:GET /jsp/HelloWorld.jsp?&& HTTP/1.0
  -test.14.golden: HelloWorld.txt
  +test.14.request:GET /jsp/helloWorld.jsp?&& HTTP/1.0
  +test.14.golden: helloWorld.txt
   test.14.showHeader:true
   test.14.magnitude:true
   
  -test.15.request:GET /jsp/declaration/IntegerOverflow.jsp HTTP/1.0
  +test.15.request:GET /jsp/declaration/integerOverflow.jsp HTTP/1.0
   test.15.returnCode:HTTP/1.0 500 Internal Server Error
   test.15.magnitude:true
   
   test.16.request:GET /jsp/error/err.jsp HTTP/1.0
  -test.16.golden:Err.txt
  +test.16.golden:err.txt
   test.16.returnCode: HTTP/1.0 200 OK
   test.16.magnitude:true
   
   test.17.request:GET /jsp/forward/forward.jsp HTTP/1.0
   test.17.returnCode: HTTP/1.0 200 OK
  +test.17.showHeader:false
  +test.17.debug:false
   test.17.magnitude:true
   
   test.18.request:GET /jsp/include/include.jsp HTTP/1.0
   test.18.returnCode: HTTP/1.0 200 OK
  -test.18.golden: Include.txt
  +test.18.golden: include.txt
   test.18.magnitude:true
   
  -test.19.request:GET /jsp/jsptoserv/jsptoservlet.jsp HTTP/1.0
  +test.19.request:GET /jsp/jsptoserv/jspToServlet.jsp HTTP/1.0
   test.19.returnCode: HTTP/1.0 200 OK
  -test.19.golden: jsptoservlet.txt
  +test.19.golden: jspToServlet.txt
  +test.19.debug:false
   test.19.magnitude:true
   
  -
  +test.20.request:GET /jsp/initDestroy.jsp HTTP/1.0
  +test.20.returnCode: HTTP/1.0 200 OK
  +test.20.showHeader:false
  +test.20.debug:false
  +test.20.magnitude:true
  +
  +test.21.request:GET /jsp/classTest.jsp HTTP/1.0
  +test.21.returnCode: HTTP/1.0 200 OK
  +test.21.golden: classTest.txt
  +test.21.debug:false
  +test.21.magnitude:true
  +
  +test.22.request:GET /jsp/import.jsp HTTP/1.0
  +test.22.returnCode: HTTP/1.0 200 OK
  +test.22.golden: import.txt
  +test.22.magnitude:true
  +
  +test.23.request:GET /jsp/buffer.jsp HTTP/1.0
  +test.23.returnCode: HTTP/1.0 200 OK
  +test.23.golden: buffer.txt
  +test.23.magnitude:true
  +
  +test.24.request:GET /jsp/buffer1.jsp HTTP/1.0
  +test.24.returnCode: HTTP/1.0 200 OK
  +test.24.magnitude:false
  +
  +test.25.request:GET /jsp/buffer2.jsp HTTP/1.0
  +test.25.returnCode: HTTP/1.0 200 OK
  +test.25.magnitude:false
  +
  +test.26.request:GET /jsp/buffer3.jsp HTTP/1.0
  +test.26.returnCode: HTTP/1.0 200 OK
  +test.26.magnitude:false
  +
  +test.27.request:GET /jsp/buffer4.jsp HTTP/1.0
  +test.27.returnCode: HTTP/1.0 200 OK
  +test.27.magnitude:false
  +
  +test.28.request:GET /jsp/comments.jsp HTTP/1.0
  +test.28.returnCode: HTTP/1.0 500 Internal Server Error
  +test.28.magnitude:true
  +
  +test.29.request:GET /jsp/parse.jsp HTTP/1.0
  +test.29.returnCode: HTTP/1.0 200 OK
  +test.29.golden: parse.txt
  +test.29.debug=false
  +test.29.magnitude:true
  +
  +test.30.request:GET /jsp/pageInfo.jsp HTTP/1.0
  +test.30.returnCode: HTTP/1.0 200 OK
  +test.30.magnitude:false
  +
  +test.31.request:GET /jsp/pageLanguage.jsp HTTP/1.0
  +test.31.returnCode: HTTP/1.0 200 OK
  +test.31.magnitude:false
  +
  +test.32.request:GET /jsp/pageIsThreadSafe.jsp HTTP/1.0
  +test.32.returnCode: HTTP/1.0 200 OK
  +test.32.magnitude:false
  +
  +test.33.request:GET /jsp/pageSession.jsp HTTP/1.0
  +test.33.returnCode: HTTP/1.0 200 OK
  +test.33.magnitude:false
  +
  +test.34.request:GET /jsp/pageAutoFlush.jsp HTTP/1.0
  +test.34.returnCode: HTTP/1.0 200 OK
  +test.34.magnitude:false
  +
  +test.35.request:GET /jsp/pageError.jsp HTTP/1.0
  +test.35.returnCode: HTTP/1.0 200 OK
  +test.35.magnitude:true
  +
  +test.36.request:GET /jsp/pageExtends.jsp HTTP/1.0
  +test.36.returnCode: HTTP/1.0 200 OK
  +test.36.magnitude:false
  +
  +test.37.request:GET /jsp/pageIsErrorPage.jsp HTTP/1.0
  +test.37.returnCode: HTTP/1.0 200 OK
  +test.37.magnitude:false
  +
  +test.38.request:GET /jsp/pageContentType.jsp HTTP/1.0
  +test.38.returnCode: HTTP/1.0 200 OK
  +test.38.magnitude:true
  +
  +test.39.request:GET /jsp/pageImport2.jsp HTTP/1.0
  +test.39.returnCode: HTTP/1.0 200 OK
  +test.39.magnitude:false
  +
  +test.40.request:GET /jsp/pageImport.jsp HTTP/1.0
  +test.40.returnCode: HTTP/1.0 200 OK
  +test.40.golden: pageImport.txt
  +test.40.magnitude:true
   
   
  
  
  

Mime
View raw message