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/02/26 22:46:42 UTC
cvs commit: xml-xalan/test/java/src/org/apache/qetest/xsl StylesheetTestletDriver.java
curcuru 01/02/26 13:46:40
Modified: test/java/src/org/apache/qetest/xsl
StylesheetTestletDriver.java
Log:
Update Datalet construction to pass in a copy of
our testProps as the Datalet's options - this allows any
generic props set in our test to appear in any sort
of Datalets we create. (Next step, later on: dynamically
create the appropriate class of Datalet via Testlet.getDefaultDatalet())
Revision Changes Path
1.2 +9 -8 xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetTestletDriver.java
Index: StylesheetTestletDriver.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetTestletDriver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StylesheetTestletDriver.java 2001/02/23 21:04:45 1.1
+++ StylesheetTestletDriver.java 2001/02/26 21:46:36 1.2
@@ -84,7 +84,7 @@
/**
* Test driver for XSLT stylesheet Testlets.
* @author shane_curcuru@lotus.com
- * @version $Id: StylesheetTestletDriver.java,v 1.1 2001/02/23 21:04:45 curcuru Exp $
+ * @version $Id: StylesheetTestletDriver.java,v 1.2 2001/02/26 21:46:36 curcuru Exp $
*/
public class StylesheetTestletDriver extends XSLProcessorTestBase
{
@@ -513,37 +513,38 @@
}
// Check if it's a normal .xsl file, or a .xml file
// (we assume .xml files are embedded tests!)
+ StylesheetDatalet d = new StylesheetDatalet();
if (file.endsWith(XML_EXTENSION))
{
- StylesheetDatalet d = new StylesheetDatalet();
d.xmlName = testLocation.getPath() + File.separator + file;
String fileNameRoot = file.substring(0, file.indexOf(XML_EXTENSION));
d.inputName = null;
d.outputName = outLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
d.goldName = goldLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
- d.setDescription(file);
- v.addElement(d);
}
else if (file.endsWith(XSL_EXTENSION))
{
- StylesheetDatalet d = new StylesheetDatalet();
d.inputName = testLocation.getPath() + File.separator + file;
String fileNameRoot = file.substring(0, file.indexOf(XSL_EXTENSION));
d.xmlName = testLocation.getPath() + File.separator + fileNameRoot + XML_EXTENSION;
d.outputName = outLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
d.goldName = goldLocation.getPath() + File.separator + fileNameRoot + OUT_EXTENSION;
- d.setDescription(file);
- v.addElement(d);
}
else
{
// Hmmm - I'm not sure what we should do here
reporter.logWarningMsg("Unexpected test file found, skipping: " + file);
}
+ d.setDescription(file);
+ // Also copy over our own testProps as it's
+ // options: this allows for future expansion
+ // of values in the datalet
+ d.options = new Properties(testProps);
+ v.addElement(d);
}
- return v; //@todo FIXME
+ return v;
}