Author: atsushi
Date: 2006-08-06 23:36:21 -0400 (Sun, 06 Aug 2006)
New Revision: 63422
Modified:
trunk/mcs/class/System.XML/System.Xml/ChangeLog
trunk/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs
trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
trunk/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
Log:
2006-08-07 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlTextWriter2.cs : WriteBinHex() is allowed at Attribute state.
Fixed bug #79019.
* XmlTextWriterTests.cs : test for #79019.
Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog 2006-08-07 03:00:16 UTC
(rev 63421)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog 2006-08-07 03:36:21 UTC
(rev 63422)
@@ -1,3 +1,8 @@
+2006-08-07 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlTextWriter2.cs : WriteBinHex() is allowed at Attribute state.
+ Fixed bug #79019.
+
2006-07-28 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlTextWriter2.cs : fixed some indentation bugs: comments and PIs
Modified: trunk/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs 2006-08-07
03:00:16 UTC (rev 63421)
+++ trunk/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs 2006-08-07
03:36:21 UTC (rev 63422)
@@ -1187,7 +1187,7 @@
{
CheckChunkRange (buffer, index, count);
- ShiftStateContent ("BinHex", false);
+ ShiftStateContent ("BinHex", true);
XmlConvert.WriteBinHex (buffer, index, count, writer);
}
Modified: trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2006-08-07
03:00:16 UTC (rev 63421)
+++ trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2006-08-07
03:36:21 UTC (rev 63422)
@@ -1,3 +1,7 @@
+2006-08-07 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XmlTextWriterTests.cs : test for #79019.
+
2006-07-28 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlTextWriterTests.cs : added test case for comments, PIs and
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
2006-08-07 03:00:16 UTC (rev 63421)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs
2006-08-07 03:36:21 UTC (rev 63422)
@@ -2240,6 +2240,19 @@
w.WriteEndElement ();
Assert.AreEqual (String.Format (@"<foo>{0}
<!--test-->{0} <?PI ?>{0} <child />{0} <!--test-->STRING</foo>",
Environment.NewLine), sw.ToString ());
}
+
+ [Test]
+ public void WriteBinHexAttribute () // for bug #79019
+ {
+ XmlWriter writer = new XmlTextWriter (TextWriter.Null);
+ writer.WriteStartElement ("test");
+ byte [] buffer1 = new byte [] {200, 155};
+ writer.WriteStartAttribute ("key", "");
+ writer.WriteBinHex (buffer1, 0, buffer1.Length);
+ writer.WriteEndAttribute ();
+ writer.WriteEndElement ();
+ }
+
#if NET_2_0
[Test]
[ExpectedException (typeof (InvalidOperationException))]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches