curcuru 01/01/11 05:44:18
Modified: test/java/src/org/apache/qetest/trax SystemIdTest.java
Log:
Updated: much better logging of which test is which,
added a few more systemIds
Revision Changes Path
1.2 +64 -7
xml-xalan/test/java/src/org/apache/qetest/trax/SystemIdTest.java
Index: SystemIdTest.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/SystemIdTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SystemIdTest.java 2001/01/10 18:41:44 1.1
+++ SystemIdTest.java 2001/01/11 13:44:17 1.2
@@ -124,7 +124,7 @@
* specifically says / forward slashes
*
* @author [EMAIL PROTECTED]
- * @version $Id: SystemIdTest.java,v 1.1 2001/01/10 18:41:44 curcuru Exp $
+ * @version $Id: SystemIdTest.java,v 1.2 2001/01/11 13:44:17 curcuru Exp $
*/
public class SystemIdTest extends XSLProcessorTestBase
{
@@ -268,19 +268,35 @@
String xslTestIds[][] =
{
+ // { systemId to test,
+ // description of the test,
+ // expected XSL behavior or exception,
+ // expected XSL inner exception,
+ // expected XML behavior or exception,
+ // expected XML inner exception
+ // }
+
// Test variations on the inputDir specified by the
// user, to be able to do some adhoc testing
{ "file:///" + inputDirPath,
"file:///, user-specified inputDir, /blah1[1a]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
+
{ "file://localhost/" + inputDirPath,
"file://localhost/, user-specified inputDir, /blah[1b]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
+
{ inputDirPath,
"Just user-specified inputDir, /blah (works normally, if
relative)[1c]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
// Test variations on the System user.dir; validation
@@ -288,14 +304,22 @@
{ "file:///" + userDirPath,
"file:///, System(user.dir), /blah (works normally)[2a]",
userDirExpected,
+ null,
+ userDirExpected,
null },
+
{ "file://localhost/" + userDirPath,
"file://localhost/, System(user.dir), /blah (works
normally)[2b]",
userDirExpected,
+ null,
+ userDirExpected,
null },
+
{ userDirPath,
"Just System(user.dir), /blah[2c]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
// Absolute path with blank . step
@@ -303,6 +327,8 @@
+ "/tests/./api/" + TRAX_SUBDIR + "/" +
knownGoodBaseName,
"file:///, System(user.dir), /./blah (???)[2d]",
userDirExpected,
+ null,
+ userDirExpected,
null },
// Absolute path with up/down steps
@@ -310,16 +336,23 @@
+ "/tests/../tests/api/" + TRAX_SUBDIR + "/" +
knownGoodBaseName,
"file:///, System(user.dir), /updir/../downdir/blah (???)[2e]",
userDirExpected,
+ null,
+ userDirExpected,
null },
// Just relative paths, should work if user.dir correct
{ "file:tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName,
"Just file:/blah relative path[3a]",
userDirExpected,
+ null,
+ userDirExpected,
null },
+
{ "tests/api/" + TRAX_SUBDIR + "/" + knownGoodBaseName,
"Just /blah relative path[3b]",
userDirExpected,
+ null,
+ userDirExpected,
null },
// file://blah should be interperted as a hostname,
@@ -327,10 +360,15 @@
{ "file://" + userDirPath,
"file://, System(user.dir), /blah (causes hostname error)[4a]",
"javax.xml.transform.TransformerConfigurationException",
+ "java.net.UnknownHostException",
+ "javax.xml.transform.TransformerException",
"java.net.UnknownHostException" },
+
{ "file://" + inputDirPath,
"file://, user-specified inputDir, /blah (causes hostname
error)[4b]",
"javax.xml.transform.TransformerConfigurationException",
+ "java.net.UnknownHostException",
+ "javax.xml.transform.TransformerException",
"java.net.UnknownHostException" },
// file://host.does.not.exist/blah should fail, here we
@@ -338,44 +376,63 @@
{ "file://this.host.does.not.exist/" + userDirPath,
"file://this.host.does.not.exist/userDir/blah (causes hostname
error)[4c]",
"javax.xml.transform.TransformerConfigurationException:
this.host.does.not.exist",
- "java.net.UnknownHostException: this.host.does.not.exist" },
+ "java.net.UnknownHostException: this.host.does.not.exist",
+ "javax.xml.transform.TransformerException:
this.host.does.not.exist",
+ "java.net.UnknownHostException" },
+
{ "file://this.host.does.not.exist/" + inputDirPath,
"file://this.host.does.not.exist/inputDir/blah (causes hostname
error)[4d]",
"javax.xml.transform.TransformerConfigurationException:
this.host.does.not.exist",
- "java.net.UnknownHostException: this.host.does.not.exist" },
+ "java.net.UnknownHostException: this.host.does.not.exist",
+ "javax.xml.transform.TransformerException:
this.host.does.not.exist",
+ "java.net.UnknownHostException" },
// Too few leading slashes for the file: spec, probably error
{ "file:/" + userDirPath,
"file:/, System(user.dir), /blah (probable error)[5a]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
+
{ "file:/" + inputDirPath,
"file:/, user-specified inputDir, /blah (probable error)[5b]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
// No leading slashes for the file: spec, behavior is?
{ "file:" + userDirPath,
"file:, System(user.dir), /blah (probable error)[6a]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
+
{ "file:" + inputDirPath,
"file:, user-specified inputDir, /blah (probable error)[6b]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
// Using backslashes in the path portion is explicitly
// forbidden in the RFC, should give error
{ "file:///" + userDirPath.replace('/', '\\'),
- "file:///, System(user.dir) \blah, (causes error)[7a]",
+ "file:///, System(user.dir) \\blah, (backslashes are
illegal)[7a]",
EXPECTED_RESULT_UNKNOWN,
+ null,
+ EXPECTED_RESULT_UNKNOWN,
null },
{ "file:///" + inputDirPath.replace('/', '\\'),
- "file:///, user-specified inputDir \blah (causes error)[7b]",
+ "file:///, user-specified inputDir \\blah (backslashes are
illegal)[7b]",
EXPECTED_RESULT_UNKNOWN,
- null },
+ null,
+ EXPECTED_RESULT_UNKNOWN,
+ null }
};
for (int i = 0; i < xslTestIds.length; i++)
@@ -392,7 +449,7 @@
// Loop and attempt to do a transform of an xml
// document with each, using known-good stylesheet
testTransformWithSystemId(xslTestIds[i][0] + ".xml",
xslTestIds[i][1],
- xslTestIds[i][2], xslTestIds[i][3]);
+ xslTestIds[i][4], xslTestIds[i][5]);
}
reporter.testCaseClose();