You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/04/17 20:38:30 UTC

cvs commit: xml-xalan/test/tests/bugzilla BugzillaNNNN.java identity.xsl

curcuru     01/04/17 11:38:30

  Added:       test/tests/bugzilla BugzillaNNNN.java identity.xsl
  Log:
  Sample files for writing automated tests to reproduce Bugzilla reports
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/bugzilla/BugzillaNNNN.java
  
  Index: BugzillaNNNN.java
  ===================================================================
  /*
   * Covered by The Apache Software License, Version 1.1
   * See xml-xalan/License
   */
  // Common Qetest / Xalan testing imports
  import org.apache.qetest.Datalet;
  import org.apache.qetest.Logger;
  import org.apache.qetest.TestletImpl;
  
  // REPLACE_imports needed for reproducing the bug
  
  
  /**
   * Testlet for reproducing Bugzilla reported bugs.
   *
   * INSTRUCTIONS:
   * <ul>Given your Bugzilla bugnumber:
   * <li>Save this file under a different name like 
   * Bugzilla<i>bugnumber</li> and search-and-replace 
   * 'NNNN' to your Bugzilla bugnumber</li>
   * <li>Search-and-replace all REPLACE_* strings with something appropriate</li>
   * <li>javac BugzillaNNNN.java</li>
   * <li>java BugzillaNNNN</li>
   * <li>Attach the .java file to your Bugzilla report (or, checkin 
   * to xml-xalan/test/tests/Bugzilla if committer)</li>
   * </ul>
   * Using this common format may allow us in the future to automate 
   * verifying Bugzilla bugs to prevent regressions!
   * @author REPLACE_your_email_address
   */
  public class BugzillaNNNN extends TestletImpl
  {
      // Initialize our classname for TestletImpl's main() method - must be updated!
      static { thisClassName = "BugzillaNNNN"; }
  
      /**
       * Write Minimal code to reproduce your Bugzilla bug report.
       * Many Bugzilla tests won't bother with a datalet; they'll 
       * just have the data to reproduce the bug encoded by default.
       * @param d (optional) Datalet to use as data point for the test.
       */
      public void execute(Datalet d)
  	{
          // Use logger.logMsg(...) instead of System.out.println(...)
          logger.logMsg(Logger.STATUSMSG, "Reproducing Bugzilla#NNNN");
  
          // Optional: use the Datalet d if supplied
  
          // Call code to reproduce the bug here
  
          // Call logger.checkFail("desc") (like Junit's assert(true, "desc")
          //  or logger.checkPass("desc")  (like Junit's assert(false, "desc")
          //  to report the actual bug fail/pass status
  	}
  
      /**
       * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=NNNN">
       * Link to Bugzilla report</a>
       * @return REPLACE_BugzillaNNNN_description.
       */
      public String getDescription()
      {
          return "REPLACE_BugzillaNNNN_description";
      }
  
  }  // end of class BugzillaNNNN
  
  
  
  
  1.1                  xml-xalan/test/tests/bugzilla/identity.xsl
  
  Index: identity.xsl
  ===================================================================
  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
  <!-- From the XSLT spec: "the identity transformation can be written using xsl:copy as follows:" -->
    <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:template>
       
  </xsl:stylesheet>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org