Author: atsushi
Date: 2006-09-26 11:52:09 -0400 (Tue, 26 Sep 2006)
New Revision: 65921
Modified:
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlDeclaration.cs
trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
trunk/mcs/class/System.XML/Test/System.Xml/XmlDeclarationTests.cs
Log:
2006-09-26 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlDeclaration.cs :
Removed bogus return statement in Value. Fixed bug #79496.
* XmlDeclarationTests.cs : added bug #79496 case.
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2006-09-26 14:59:27 UTC
(rev 65920)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2006-09-26 15:52:09 UTC
(rev 65921)
@@ -1,3 +1,8 @@
+2006-09-26 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlDeclaration.cs :
+ Removed bogus return statement in Value. Fixed bug #79496.
+
2006-09-21 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlNameEntryCache.cs : It should expand temporary buffer even at
Modified: trunk/mcs/class/System.XML/System.Xml/XmlDeclaration.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlDeclaration.cs 2006-09-26
14:59:27 UTC (rev 65920)
+++ trunk/mcs/class/System.XML/System.Xml/XmlDeclaration.cs 2006-09-26
15:52:09 UTC (rev 65921)
@@ -186,7 +186,6 @@
if (!XmlChar.IsWhitespace (input [index]))
throw new XmlException ("Invalid XML
declaration.");
index = SkipWhitespace (input, index + 1);
- return;
}
if (input.Length > index + 10 && input.IndexOf
("standalone", index, 10) > 0) {
Modified: trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2006-09-26
14:59:27 UTC (rev 65920)
+++ trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2006-09-26
15:52:09 UTC (rev 65921)
@@ -1,3 +1,7 @@
+2006-09-26 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlDeclarationTests.cs : added bug #79496 case.
+
2006-09-21 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlDocumentTests.cs : added bug #79468 case.
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlDeclarationTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlDeclarationTests.cs
2006-09-26 14:59:27 UTC (rev 65920)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlDeclarationTests.cs
2006-09-26 15:52:09 UTC (rev 65921)
@@ -9,6 +9,7 @@
//
using System;
+using System.IO;
using System.Xml;
using NUnit.Framework;
@@ -197,7 +198,21 @@
d.Value = "version='1.0' encoding='ISO-8859-1'
standalone='yes'" ;
AssertEquals ("Value round-trip ('s)", expected,
d.Value);
+ }
+ [Test]
+ public void Bug79496 ()
+ {
+ StringWriter sw = new StringWriter ();
+ XmlTextWriter xtw = new XmlTextWriter (sw);
+ xtw.WriteStartDocument (true);
+ xtw.WriteStartElement ("person");
+ xtw.WriteEndElement ();
+ xtw.Flush ();
+
+ XmlDocument doc = new XmlDocument ();
+ doc.LoadXml (sw.ToString ());
+ AssertEquals ("<?xml version=\"1.0\"
encoding=\"utf-16\" standalone=\"yes\"?><person />", doc.OuterXml);
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches