From: Oleg T. <he...@us...> - 2004-10-19 16:26:08
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19600/v1/test Modified Files: EntryPoint.cs FourThoughtTests.cs NistTests.cs XIncludeTest.csproj Added Files: Elliotte_Rusty_HaroldTests.cs LTG_Edinburgh_UnivTests.cs RedhatTests.cs TestsGen.xslt generate-tests.cmd Removed Files: EdUniTests.cs ImaqTests.cs Log Message: XInclude Test Suite updated --- ImaqTests.cs DELETED --- Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- XIncludeTest.csproj 17 Oct 2004 21:01:12 -0000 1.5 +++ XIncludeTest.csproj 19 Oct 2004 16:24:56 -0000 1.6 @@ -95,7 +95,7 @@ <Files> <Include> <File - RelPath = "EdUniTests.cs" + RelPath = "Elliotte_Rusty_HaroldTests.cs" SubType = "Code" BuildAction = "Compile" /> @@ -110,16 +110,29 @@ BuildAction = "Compile" /> [...985 lines suppressed...] + <File + RelPath = "XInclude-Test-Suite\Harold\test\text\UnicodeLittleUnmarked.xml" + BuildAction = "Content" + /> + <File + RelPath = "XInclude-Test-Suite\Harold\test\text\UTF32BE.xml" + BuildAction = "Content" + /> + <File + RelPath = "XInclude-Test-Suite\Harold\test\text\UTF32LE.xml" + BuildAction = "Content" + /> + <File + RelPath = "XInclude-Test-Suite\Harold\test\text\UTF8.xml" + BuildAction = "Content" + /> + <File RelPath = "XInclude-Test-Suite\Imaq\result\XInclude\docids.xml" BuildAction = "Content" /> --- EdUniTests.cs DELETED --- --- NEW FILE: Elliotte_Rusty_HaroldTests.cs --- (This appears to be a binary file; contents omitted.) Index: FourThoughtTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/FourThoughtTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FourThoughtTests.cs 16 Oct 2004 21:03:15 -0000 1.1 +++ FourThoughtTests.cs 19 Oct 2004 16:24:56 -0000 1.2 @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Xml; using System.IO; @@ -10,7 +10,7 @@ namespace Mvp.Xml.XInclude.Test { /// <summary> - /// FourThough test cases from the XInclude Test suite. + /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] public class FourThoughtTests @@ -27,70 +27,87 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/FourThought/result/XInclude/" + result); + "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result); } - + + /// <summary> - /// Simple test of including another XML document. + /// Simple test of including another XML document. /// </summary> [Test] - public void Test1() + public void FourThought_include_01() { - RunAndCompare("ft-include1.xml", "include1.xml"); - } - + RunAndCompare("ft-include1.xml", "../../../result/XInclude/include1.xml"); + } + + + /// <summary> - /// Test recursive inclusion. + /// Test recursive inclusion. /// </summary> [Test] - public void Test2() + public void FourThought_include_02() { - RunAndCompare("ft-include2.xml", "include2.xml"); - } + RunAndCompare("ft-include2.xml", "../../../result/XInclude/include2.xml"); + } + + + /// <summary> - /// Simple test of including another text document. + /// Simple test of including another text document. /// </summary> [Test] - public void Test3() + public void FourThought_include_03() { - RunAndCompare("ft-include3.xml", "include3.xml"); - } + RunAndCompare("ft-include3.xml", "../../../result/XInclude/include3.xml"); + } + + /// <summary> - /// Simple test of including a set of nodes from an XML document. + /// Simple test of including a set of nodes from an XML document. /// </summary> [Test] - public void Test4() + public void FourThought_include_04() { - RunAndCompare("ft-include4.xml", "include4.xml"); - } + RunAndCompare("ft-include4.xml", "../../../result/XInclude/include4.xml"); + } + + /// <summary> - /// Simple test of including a set of nodes from an XML document. + /// Simple test of including a set of nodes from an XML document. /// </summary> [Test] - public void Test5() + public void FourThought_include_05() { - RunAndCompare("ft-include5.xml", "include5.xml"); - } + RunAndCompare("ft-include5.xml", "../../../result/XInclude/include5.xml"); + } + + /// <summary> - /// Simple test of including a set of nodes from an XML document. + /// Simple test of including a set of nodes from an XML document. /// </summary> [Test] - public void Test6() + public void FourThought_include_06() { - RunAndCompare("ft-include6.xml", "include6.xml"); - } + RunAndCompare("ft-include6.xml", "../../../result/XInclude/include6.xml"); + } + + /// <summary> - /// Simple test of including a set of nodes from an XML document. + /// Simple test of including a set of nodes from an XML document. /// </summary> [Test] - public void Test7() + public void FourThought_include_07() { - RunAndCompare("ft-include7.xml", "include7.xml"); - } + RunAndCompare("ft-include7.xml", "../../../result/XInclude/include7.xml"); + } + + + } } --- NEW FILE: RedhatTests.cs --- (This appears to be a binary file; contents omitted.) Index: NistTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NistTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NistTests.cs 18 Oct 2004 18:19:22 -0000 1.2 +++ NistTests.cs 19 Oct 2004 16:24:56 -0000 1.3 @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Xml; using System.IO; @@ -9,16 +9,16 @@ namespace Mvp.Xml.XInclude.Test { - /// <summary> - /// NIST test cases from the XInclude Test suite. - /// </summary> - [TestFixture] - public class NistTests - { - public NistTests() - { - Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); - } + /// <summary> + /// Edinburgh University test cases from the XInclude Test suite. + /// </summary> + [TestFixture] + public class NISTTests + { + public NISTTests() + { + Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); + } /// <summary> /// Utility method for running tests. @@ -27,535 +27,686 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Nist/test/docs/" + source, - "../../XInclude-Test-Suite/Nist/result/" + result); + "../../XInclude-Test-Suite/Nist/test/docs/" + result); } - + + /// <summary> - /// + /// Test the inclusion of another XML document. /// </summary> [Test] - public void Test1() + public void Nist_include_01() { - RunAndCompare("nist-include-01.xml", "nist-include-01.xml"); - } + RunAndCompare("nist-include-01.xml", "../../result/nist-include-01.xml"); + } + + + /// <summary> - /// + /// Test that the encoding attribute in the Xinclude element has no effect when parse="xml". /// </summary> [Test] - public void Test2() + public void Nist_include_02() { - RunAndCompare("nist-include-02.xml", "nist-include-02.xml"); - } + RunAndCompare("nist-include-02.xml", "../../result/nist-include-02.xml"); + } + + /// <summary> - /// Test that values other than "xml" and "text" in the parse - /// attribute of the XInclude element will generate a fatal error. - /// Negative test. + /// Test that values other than xml or text, in the parse attribute of the XInclude + /// element, result in fatal errors. /// </summary> [Test] [ExpectedException(typeof(UnknownParseAttributeValueException))] - public void Test3() + public void Nist_include_03() { - RunAndCompare("nist-include-03.xml", "nist-include-03.xml"); - } + RunAndCompare("nist-include-03.xml", ""); + } + + /// <summary> - /// + /// Test of fallback element appearing as a child of an xinclude element. /// </summary> [Test] - public void Test4() + public void Nist_include_04() { - RunAndCompare("nist-include-04.xml", "nist-include-04.xml"); - } + RunAndCompare("nist-include-04.xml", "../../result/nist-include-04.xml"); + } + + /// <summary> - /// Test a fallback element not appearing as a direct child of - /// an xinclude element. A fatal error should be generated. + /// Test a fallback element not appearing as a direct + /// child of an xinclude element. A fatal error should be generated. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test5() + public void Nist_include_05() { - RunAndCompare("nist-include-05.xml", "nist-include-05.xml"); - } + RunAndCompare("nist-include-05.xml", ""); + } + + /// <summary> - /// + /// Test a fallback when a resource error occurs. /// </summary> [Test] - public void Test6() + public void Nist_include_06() { - RunAndCompare("nist-include-06.xml", "nist-include-06.xml"); - } + RunAndCompare("nist-include-06.xml", "../../result/nist-include-06.xml"); + } + + /// <summary> - /// + /// Test an empty fallback element. The xinclude element is + /// removed from the results. /// </summary> [Test] - public void Test7() + public void Nist_include_07() { - RunAndCompare("nist-include-07.xml", "nist-include-07.xml"); - } + RunAndCompare("nist-include-07.xml", "../../result/nist-include-07.xml"); + } + + /// <summary> - /// Test that when the fallback element is missing, from the - /// include element, a resource error results in a fatal error. - /// Negative test. + /// Test of a fallback element missing from the + /// include element. A resource error results in a fatal error. /// </summary> [Test] [ExpectedException(typeof(FatalResourceException))] - public void Test8() + public void Nist_include_08() { - RunAndCompare("nist-include-08.xml", "nist-include-08.xml"); - } - + RunAndCompare("nist-include-08.xml", ""); + } + + /// <summary> - /// + /// Test unqualified attributes in the include element. They must be ignored. /// </summary> [Test] - public void Test9() + public void Nist_include_09() { - RunAndCompare("nist-include-09.xml", "nist-include-09.xml"); - } + RunAndCompare("nist-include-09.xml", "../../result/nist-include-09.xml"); + } + + /// <summary> - /// + /// Test content other than the fallback, in the xinclude element. + /// This content must be ignored. /// </summary> [Test] - public void Test10() + public void Nist_include_10() { - RunAndCompare("nist-include-10.xml", "nist-include-10.xml"); - } + RunAndCompare("nist-include-10.xml", "../../result/nist-include-10.xml"); + } + + + /// <summary> - /// Test a resource containing non-well-formed XML. - /// The inclusion results in a fatal error. + /// Test a resource containing non-well-formed XML. The inclusion results in a fatal error. /// </summary> [Test] [ExpectedException(typeof(FatalResourceException))] - public void Test11() + public void Nist_include_11() { - RunAndCompare("nist-include-11.xml", "nist-include-11.xml"); - } + RunAndCompare("nist-include-11.xml", ""); + } + + + /// <summary> - /// Test that is a fatal error for an include element to contain more - /// than one fallback elements. + /// Test that is a fatal error for an include element to contain more than one fallback elements. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test12() + public void Nist_include_12() { - RunAndCompare("nist-include-12.xml", "nist-include-12.xml"); - } + RunAndCompare("nist-include-12.xml", ""); + } + + /// <summary> - /// + /// Test a fallback element containing markup when parse="text". /// </summary> [Test] - public void Test13() + public void Nist_include_13() { - RunAndCompare("nist-include-13.xml", "nist-include-13.xml"); - } + RunAndCompare("nist-include-13.xml", "../../result/nist-include-13.xml"); + } + + /// <summary> - /// + /// Test a fallback element containing markup when parse="text". /// </summary> [Test] - public void Test14() + public void Nist_include_14() { - RunAndCompare("nist-include-14.xml", "nist-include-14.xml"); - } + RunAndCompare("nist-include-14.xml", "../../result/nist-include-14.xml"); + } + + /// <summary> - /// It is illegal for an include element to point to itself, - /// when parse="xml". + /// It is illegal for an include element to point to itself, when parse="xml". /// </summary> [Test] [ExpectedException(typeof(CircularInclusionException))] - public void Test15() + public void Nist_include_15() { - RunAndCompare("nist-include-15.xml", "nist-include-15.xml"); - } + RunAndCompare("nist-include-15.xml", ""); + } + + /// <summary> - /// + /// Test a document type declaration information item child + /// in the resource information set. the DTD should be excluded for inclusion in the source infoset. /// </summary> [Test] - public void Test16() + public void Nist_include_16() { - RunAndCompare("nist-include-16.xml", "nist-include-16.xml"); - } + RunAndCompare("nist-include-16.xml", "../../result/nist-include-16.xml"); + } + + /// <summary> - /// + /// Test intra-document reference within include elements. /// </summary> [Test] - public void Test17() + public void Nist_include_17() { - RunAndCompare("nist-include-17.xml", "nist-include-17.xml"); - } + RunAndCompare("nist-include-17.xml", "../../result/nist-include-17.xml"); + } + + /// <summary> - /// + /// Simple test of including a set of nodes from an XML document. /// </summary> [Test] - public void Test18() + public void Nist_include_18() { - RunAndCompare("nist-include-18.xml", "nist-include-18.xml"); - } - + RunAndCompare("nist-include-18.xml", "../../result/nist-include-18.xml"); + } + + /// <summary> - /// + /// Test the inclusion of a set of nodes from an XML document. /// </summary> [Test] - public void Test19() + public void Nist_include_19() { - RunAndCompare("nist-include-19.xml", "nist-include-19.xml"); - } + RunAndCompare("nist-include-19.xml", "../../result/nist-include-19.xml"); + } + + /// <summary> - /// + /// Test an include location identifying a document information item with + /// an xpointer locating the document root. In this case + /// the set of top level include items is the children of acquired infoset's + /// document information item, except for the document type information + /// item. /// </summary> [Test] - public void Test20() + public void Nist_include_20() { - RunAndCompare("nist-include-20.xml", "nist-include-20.xml"); - } + RunAndCompare("nist-include-20.xml", "../../result/nist-include-20.xml"); + } + + /// <summary> - /// + /// Including an XML document with an unparsed entity. /// </summary> [Test] - public void Test21() + public void Nist_include_21() { - RunAndCompare("nist-include-21.xml", "nist-include-21.xml"); - } + RunAndCompare("nist-include-21.xml", "../../result/nist-include-21.xml"); + } + + + /// <summary> - /// + /// Testing when the document (top level) element in the source infoset is an + /// include element. /// </summary> [Test] - public void Test22() + public void Nist_include_22() { - RunAndCompare("nist-include-22.xml", "nist-include-22.xml"); - } + RunAndCompare("nist-include-22.xml", "../../result/nist-include-22.xml"); + } + + /// <summary> - /// Testing an include element in the document (top-level) element - /// in the source doc. - /// Test should fail because is including more than one element. + /// Testing an include element in the document (top-level) element in the source doc. + /// Test should fail because is including more than one element. /// </summary> [Test] [ExpectedException(typeof(MalformedXInclusionResultError))] - public void Test23() + public void Nist_include_23() { - RunAndCompare("nist-include-23.xml", "nist-include-23.xml"); - } + RunAndCompare("nist-include-23.xml", ""); + } + + /// <summary> - /// + /// Testing an include element in the document (top-level) element in the source doc. + /// Test should fail because is including only a processing instruction. /// </summary> [Test] - public void Test24() + [ExpectedException(typeof(Exception))] + public void Nist_include_24() { - RunAndCompare("nist-include-24.xml", "nist-include-24.xml"); - } + RunAndCompare("nist-include-24.xml", ""); + } + + /// <summary> - /// + /// Testing an include element in the document (top-level) element in the source doc. + /// Test should fail because is including only a comment. /// </summary> [Test] - public void Test25() + [ExpectedException(typeof(Exception))] + public void Nist_include_25() { - RunAndCompare("nist-include-25.xml", "nist-include-25.xml"); - } + RunAndCompare("nist-include-25.xml", ""); + } + + /// <summary> - /// + /// Test relative URI references in the included infoset. /// </summary> [Test] - public void Test26() + public void Nist_include_26() { - RunAndCompare("nist-include-26.xml", "nist-include-26.xml"); - } - + RunAndCompare("nist-include-26.xml", "../../result/nist-include-26.xml"); + } + + + /// <summary> - /// + /// Test that the encoding attribute when parse="xml" does not translate the incoming document. /// </summary> [Test] - public void Test27() + public void Nist_include_27() { - RunAndCompare("nist-include-27.xml", "nist-include-27.xml"); - } + RunAndCompare("nist-include-27.xml", "../../result/nist-include-27.xml"); + } + + /// <summary> - /// + /// including another XML document with IDs, using a shorthand pointer. /// </summary> [Test] - public void Test28() + public void Nist_include_28() { - RunAndCompare("nist-include-28.xml", "nist-include-28.xml"); - } + RunAndCompare("nist-include-28.xml", "../../result/nist-include-28.xml"); + } + + /// <summary> - /// + /// including another XML document with IDs, using a shorthand pointer. /// </summary> [Test] - public void Test29() + public void Nist_include_29() { - RunAndCompare("nist-include-29.xml", "nist-include-29.xml"); - } + RunAndCompare("nist-include-29.xml", "../../result/nist-include-29.xml"); + } + + /// <summary> - /// + /// Including another XML document with IDs, using a shorthand pointer. /// </summary> [Test] - public void Test30() + public void Nist_include_30() { - RunAndCompare("nist-include-30.xml", "nist-include-30.xml"); - } + RunAndCompare("nist-include-30.xml", "../../result/nist-include-30.xml"); + } + + /// <summary> - /// + /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - public void Test31() + public void Nist_include_31() { - RunAndCompare("nist-include-31.xml", "nist-include-31.xml"); - } + RunAndCompare("nist-include-31.xml", "../../result/nist-include-31.xml"); + } + + + /// <summary> - /// + /// Including an XML document using an XPointer element scheme. /// </summary> [Test] [ExpectedException(typeof(FatalResourceException))] - public void Test32() + public void Nist_include_32() { - RunAndCompare("nist-include-32.xml", "nist-include-32.xml"); - } + RunAndCompare("nist-include-32.xml", ""); + } + + /// <summary> - /// + /// Including an XML document using an XPointer element scheme. /// </summary> [Test] [ExpectedException(typeof(FatalResourceException))] - public void Test33() + public void Nist_include_33() { - RunAndCompare("nist-include-33.xml", "nist-include-34.xml"); - } + RunAndCompare("nist-include-33.xml", ""); + } + + /// <summary> - /// + /// Including another XML document with ids using XPointer element scheme. /// </summary> [Test] - public void Test35() + public void Nist_include_34() { - RunAndCompare("nist-include-35.xml", "nist-include-35.xml"); - } + RunAndCompare("nist-include-34.xml", "../../result/nist-include-34.xml"); + } + + /// <summary> - /// + /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - public void Test36() + public void Nist_include_35() { - RunAndCompare("nist-include-36.xml", "nist-include-36.xml"); - } + RunAndCompare("nist-include-35.xml", "../../result/nist-include-35.xml"); + } + + /// <summary> - /// + /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - public void Test37() + public void Nist_include_36() { - RunAndCompare("nist-include-37.xml", "nist-include-37.xml"); - } + RunAndCompare("nist-include-36.xml", "../../result/nist-include-36.xml"); + } + + /// <summary> - /// + /// Including another XML document using XPointer Framework scheme-base pointer. + /// If the processor does not support the scheme used in a pointer part, it skip that pointer part. /// </summary> [Test] - public void Test38() + public void Nist_include_37() { - RunAndCompare("nist-include-38.xml", "nist-include-38.xml"); - } + RunAndCompare("nist-include-37.xml", "../../result/nist-include-37.xml"); + } + + /// <summary> - /// + /// Including another XML document using XPointer Framework. + /// If the processor does not support the scheme used in a pointer part, it skip that pointer part. /// </summary> [Test] - public void Test39() + public void Nist_include_38() { - RunAndCompare("nist-include-39.xml", "nist-include-39.xml"); - } + RunAndCompare("nist-include-38.xml", "../../result/nist-include-38.xml"); + } + + /// <summary> - /// + /// Testing the content of the xinclude element. + /// The comment should be ignored . /// </summary> [Test] - public void Test40() + public void nist_include_39() { - RunAndCompare("nist-include-40.xml", "nist-include-40.xml"); - } + RunAndCompare("nist-include-39.xml", "../../result/nist-include-39.xml"); + } + + /// <summary> - /// The content of the include element is another - /// include element, this test should result in a fatal error. + /// Testing the content of the xinclude element. + /// The element should be ignored . + /// </summary> + [Test] + public void nist_include_40() + { + RunAndCompare("nist-include-40.xml", "../../result/nist-include-40.xml"); + } + + + + /// <summary> + /// Testing the content of the xinclude element. + /// This test should result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test41() + public void nist_include_41() { - RunAndCompare("nist-include-41.xml", "nist-include-41.xml"); - } + RunAndCompare("nist-include-41.xml", ""); + } + + /// <summary> - /// Testing the content of the xinclude element. This test should result - /// in a fatal error. + /// Testing the content of the xinclude element. + /// The xinclude element may contain a fallback element; + /// other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test42() + public void Nist_include_42() { - RunAndCompare("nist-include-42.xml", "nist-include-42.xml"); - } + RunAndCompare("nist-include-42.xml", ""); + } + + + /// <summary> - /// Testing the content of the xinclude element. This test - /// should result in a fatal error. The content must be one fallback. + /// Testing the content of the xinclude element. + /// The content must be one fallback. This test should result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test43() + public void Nist_include_43() { - RunAndCompare("nist-include-43.xml", "nist-include-43.xml"); - } + RunAndCompare("nist-include-43.xml", ""); + } + + /// <summary> - /// Test a resource that contains not-well-formed XML. - /// This test should result in a fatal error. + /// Test a resource that contains not-well-formed XML. + /// This test should result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XmlException))] - public void Test44() + public void Nist_include_44() { - RunAndCompare("nist-include-44.xml", "nist-include-44.xml"); - } + RunAndCompare("nist-include-44.xml", ""); + } + + /// <summary> - /// Test a resource that contains not-well-formed XML. - /// This test should result in a fatal error. + /// Test a resource that contains not-well-formed XML. + /// This test should result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XmlException))] - public void Test45() + public void Nist_include_45() { - RunAndCompare("nist-include-45.xml", "nist-include-45.xml"); - } + RunAndCompare("nist-include-45.xml", ""); + } + + /// <summary> - /// Testing the content of the xinclude element. The xinclude element - /// may contain a fallback element; other elements from the - /// xinclude namespace result in a fatal error. + /// Testing the content of the xinclude element. + /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test46() + public void Nist_include_46() { - RunAndCompare("nist-include-46.xml", "nist-include-46.xml"); - } + RunAndCompare("nist-include-46.xml", ""); + } + + /// <summary> - /// Testing the content of the xinclude element. The xinclude - /// element may contain a fallback element; other elements from - /// the xinclude namespace result in a fatal error. + /// Testing the content of the xinclude element. + /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] [ExpectedException(typeof(XIncludeSyntaxError))] - public void Test47() + public void Nist_include_47() { - RunAndCompare("nist-include-47.xml", "nist-include-47.xml"); - } + RunAndCompare("nist-include-47.xml", ""); + } + + /// <summary> - /// + /// It is a fatal error to resolve an xpointer scheme on a document + /// that contains unexpanded entity reference information items. /// </summary> [Test] - public void Test48() + [ExpectedException(typeof(Exception))] + public void Nist_include_48() { - RunAndCompare("nist-include-48.xml", "nist-include-48.xml"); - } + RunAndCompare("nist-include-48.xml", ""); + } + + /// <summary> - /// + /// The unexpanded entity reference information items, if present in the source infoset, + /// will appear in the result infoset. /// </summary> [Test] - public void Test49() + public void Nist_include_49() { - RunAndCompare("nist-include-49.xml", "nist-include-49.xml"); - } + RunAndCompare("nist-include-49.xml", "../../result/nist-include-49.xml"); + } + + /// <summary> - /// + /// Test an include location identifying the document information item without an Xpointer, + /// The set of top-level included items should be the children of the acquired inforset's document + /// information item, except for the document type declaration information item. /// </summary> [Test] - public void Test50() + public void Nist_include_50() { - RunAndCompare("nist-include-50.xml", "nist-include-50.xml"); - } + RunAndCompare("nist-include-50.xml", "../../result/nist-include-50.xml"); + } + + /// <summary> - /// + /// Test an include location having an XPointer identifying a comment. + /// The set of top-level included items should consist of the information item corresponding + /// to the comment node in the acquired infoset. /// </summary> [Test] - public void Test51() + public void Nist_include_51() { - RunAndCompare("nist-include-51.xml", "nist-include-51.xml"); - } + RunAndCompare("nist-include-51.xml", "../../result/nist-include-51.xml"); + } + + /// <summary> - /// + /// Test an include location having an XPointer identifying a processing instruction. + /// The set of top-level included items should consist of the information item corresponding + /// to the processing instruction node in the acquired infoset. /// </summary> [Test] - public void Test52() + public void Nist_include_52() { - RunAndCompare("nist-include-52.xml", "nist-include-52.xml"); - } + RunAndCompare("nist-include-52.xml", "../../result/nist-include-52.xml"); + } + + + /// <summary> - /// Test that an include location identifying an attribute node - /// will result in a fatal error. + /// Test that an include location identifying an attribute node will result in a + /// fatal error. /// </summary> [Test] [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] - public void Test53() + public void Nist_include_53() { - RunAndCompare("nist-include-53.xml", "nist-include-53.xml"); - } + RunAndCompare("nist-include-53.xml", ""); + } + + /// <summary> - /// Test that an include location identifying an attribute node - /// will result in a fatal error. + /// Test that an include location identifying an attribute node will result in a + /// fatal error. /// </summary> [Test] [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] - public void Test54() + public void Nist_include_54() { - RunAndCompare("nist-include-54.xml", "nist-include-54.xml"); - } + RunAndCompare("nist-include-54.xml", ""); + } + + /// <summary> - /// + /// Including a duplicate unparsed entity. + /// Test should ignore duplicate unparsed entity. /// </summary> [Test] - public void Test55() + public void Nist_include_55() { - RunAndCompare("nist-include-55.xml", "nist-include-55.xml"); - } + RunAndCompare("nist-include-55.xml", "../../result/nist-include-55.xml"); + } + + /// <summary> - /// + /// Including an unparsed entity with same name, + /// but different sysid. Test should fail. /// </summary> [Test] - public void Test56() + [ExpectedException(typeof(Exception))] + public void Nist_include_56() { - RunAndCompare("nist-include-56.xml", "nist-include-56.xml"); - } - } + RunAndCompare("nist-include-56.xml", ""); + } + + + + + + } } --- NEW FILE: LTG_Edinburgh_UnivTests.cs --- (This appears to be a binary file; contents omitted.) Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/EntryPoint.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EntryPoint.cs 18 Oct 2004 18:19:21 -0000 1.2 +++ EntryPoint.cs 19 Oct 2004 16:24:56 -0000 1.3 @@ -9,12 +9,12 @@ { public static void Main() { - //XIncludeReaderTests rt = new XIncludeReaderTests(); + XIncludeReaderTests rt = new XIncludeReaderTests(); //EdUniTests rt = new EdUniTests(); - NistTests rt = new NistTests(); + //NistTests rt = new NistTests(); try { - rt.Test24(); + rt.IncludesItself(); } catch (Exception e) { --- NEW FILE: TestsGen.xslt --- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="exsl str"> <xsl:template match="testsuite"> <xsl:apply-templates select="testcases"/> </xsl:template> <xsl:template match="testcases"> <xsl:variable name="creator" select="translate(@creator, ' ,', '_')"/> <exsl:document href="{$creator}Tests.cs" method="text" encoding="UTF-8">using System; using System.Diagnostics; using System.Xml; using System.IO; using System.Text; using Mvp.Xml.XInclude; using NUnit.Framework; namespace Mvp.Xml.XInclude.Test { /// <summary> /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] public class <xsl:value-of select="$creator"/>Tests { public <xsl:value-of select="$creator"/>Tests() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } /// <summary> /// Utility method for running tests. /// </summary> public static void RunAndCompare(string source, string result) { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + source, "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result); } <xsl:apply-templates/> } } </exsl:document> </xsl:template> <xsl:template match="testcase"> /// <summary><xsl:for-each select="str:split(description, '
')"> /// <xsl:value-of select="normalize-space(.)"/></xsl:for-each> /// </summary> [Test]<xsl:if test="@type='error'"> [ExpectedException(typeof(Exception))]</xsl:if> public void <xsl:value-of select="translate(@id, '-', '_')"/>() { RunAndCompare("<xsl:value-of select="@href"/>", "<xsl:value-of select="output"/>"); } </xsl:template> </xsl:stylesheet> --- NEW FILE: generate-tests.cmd --- nxslt XInclude-Test-Suite\testdescr.xml TestsGen.xslt -mo |