diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-02-06 17:13:28 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-02-06 17:13:28 +0300 |
commit | fbda9fbe5d4a496b8cde266fa0ca07f91df8779a (patch) | |
tree | 214369ddace0496e9566177d0f02c54a4fd118dd /mcs/class/System.XML/Test | |
parent | da4068f8c00cb535b0c95464c4da9138d300e914 (diff) |
2009-02-06 Atsushi Enomoto <atsushi@ximian.com>
* XmlTextWriter2.cs : in WriteStartAttribute(), fill namespace in
case it is null and the prefix has matching ns. Fixed bug #472634.
* XmlTextWriterTests.cs : added test for bug #472634.
svn path=/trunk/mcs/; revision=126047
Diffstat (limited to 'mcs/class/System.XML/Test')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog index 79197a3d6ee..23ace5198da 100644 --- a/mcs/class/System.XML/Test/System.Xml/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog @@ -1,3 +1,7 @@ +2009-02-06 Atsushi Enomoto <atsushi@ximian.com> + + * XmlTextWriterTests.cs : added test for bug #472634. + 2009-01-20 Atsushi Enomoto <atsushi@ximian.com> * XmlReaderCommonTests.cs : added test for bug #464229. diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs index d4d144ab0d6..176bf71cfa7 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs @@ -2320,6 +2320,18 @@ namespace MonoTests.System.Xml Assert.IsTrue (xml.IndexOf ("xmlns", first + 5) > 0); } + [Test] + public void WriteAttributePrefixedNullNamespace () + { + StringWriter sw = new StringWriter (); + XmlWriter xw = new XmlTextWriter (sw); + xw.WriteStartElement ("root"); + xw.WriteAttributeString ("xmlns", "abc", null, "uri:abcnamespace"); + xw.WriteAttributeString ("abc", "def", null, "value"); + xw.WriteEndElement (); + Assert.AreEqual ("<root xmlns:abc=\"uri:abcnamespace\" abc:def=\"value\" />", sw.ToString ()); + } + #if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] |