diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-07-22 12:38:04 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-07-22 12:38:04 +0400 |
commit | ca5cc074aa57c2899623b4ee42801bec44c41ff9 (patch) | |
tree | 50a4ce3bc4fffb6c9dd79d29784aa92cb649a6f6 /mcs/class/System.XML/Test | |
parent | 49c3dbeaee2767eeeb6c989a59c8d4708ff9c0f9 (diff) |
2009-07-22 Atsushi Enomoto <atsushi@ximian.com>
* XmlInputStream.cs : cosmetic exception type change. Patch by
Hib Eris. Fixed bug #523971.
* XmlTextReaderTests.cs : added test for bug #523971 by Hib Eris.
svn path=/trunk/mcs/; revision=138369
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/XmlTextReaderTests.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 bb14776fe43..b944a2de6e2 100644 --- a/mcs/class/System.XML/Test/System.Xml/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog @@ -1,3 +1,7 @@ +2009-07-22 Atsushi Enomoto <atsushi@ximian.com> + + * XmlTextReaderTests.cs : added test for bug #523971 by Hib Eris. + 2009-06-26 Robert Jordan <robertj@gmx.net> * *.cs: Upgrade to new NUnit style. diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs index 0f708e88cc9..f9fee3e12bb 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs @@ -1283,5 +1283,17 @@ namespace MonoTests.System.Xml Assert.IsNull (ctx.NamespaceManager, "#1"); reader.Read (); // should not raise NRE. } + + [Test] + [ExpectedException (typeof (XmlException))] + public void InvalidUTF () + { + byte [] data = new byte [] {0x4d, 0x53, 0x43, 0x46, + 0x00, 0x00, 0x00, 0x00, 0xab, 0x0a}; + XmlTextReader xtr = new XmlTextReader ( + new MemoryStream (data)); + xtr.Read (); + } + } } |