Author: atsushi
Date: 2005-06-27 14:07:29 -0400 (Mon, 27 Jun 2005)
New Revision: 46581

Modified:
   trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
   trunk/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs
Log:
2005-06-27  Atsushi Enomoto <[EMAIL PROTECTED]>

        * XmlTextReaderTests.cs : added a testcase for not-wf entity 
          declaration which is actually not used in the instance.



Modified: trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog        2005-06-27 
18:00:50 UTC (rev 46580)
+++ trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog        2005-06-27 
18:07:29 UTC (rev 46581)
@@ -1,3 +1,8 @@
+2005-06-27  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * XmlTextReaderTests.cs : added a testcase for not-wf entity 
+         declaration which is actually not used in the instance.
+
 2005-06-23  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * XsdParticleValidationTests.cs : XmlSchemaException -> 

Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs    
2005-06-27 18:00:50 UTC (rev 46580)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs    
2005-06-27 18:07:29 UTC (rev 46581)
@@ -1100,5 +1100,20 @@
                        AssertEquals ("#1", 0xf090, (int) r.Value [0]);
                        AssertEquals ("#1", 0x8080, (int) r.Value [1]);
                }
+
+               [Test]
+               [ExpectedException (typeof (XmlException))]
+               public void EntityDeclarationNotWF ()
+               {
+                       string xml = @"<!DOCTYPE doc [
+                               <!ELEMENT doc (#PCDATA)>
+                               <!ENTITY e ''>
+                               <!ENTITY e '<foo&>'>
+                               ]>
+                               <doc>&e;</doc> ";
+                       XmlTextReader xtr = new XmlTextReader (xml,
+                               XmlNodeType.Document, null);
+                       xtr.Read ();
+               }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to