diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-04-02 13:23:41 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-04-02 13:23:41 +0400 |
commit | 0e79d8f402f4913a4378d0dab346281720b59624 (patch) | |
tree | c65670aea1b46f331b9298fa5661ff09f73eef69 /mcs/class/System.XML/Test | |
parent | 24c587136c1c86fa4dd4102d29bcfe3064bf58f2 (diff) |
2008-04-02 Atsushi Enomoto <atsushi@ximian.com>
* XPathEditableDocument.cs : it should not expect ParentNode for
OwnerElement. Fixed bug #376210.
* XPathEditableNavigatorTests.cs : added test for bug #376210.
svn path=/trunk/mcs/; revision=99629
Diffstat (limited to 'mcs/class/System.XML/Test')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog index 91f4d050e3d..3ee89b5f264 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog @@ -1,5 +1,9 @@ 2008-04-02 Atsushi Enomoto <atsushi@ximian.com> + * XPathEditableNavigatorTests.cs : added test for bug #376210. + +2008-04-02 Atsushi Enomoto <atsushi@ximian.com> + * XPathNavigatorTests.cs : added test for bug #376191. 2008-03-17 Atsushi Enomoto <atsushi@ximian.com> diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs index 81334614040..6b0d0c230ef 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs @@ -758,6 +758,19 @@ namespace MonoTests.System.Xml.XPath Assert.IsTrue (doc.CreateNavigator ().CanEdit); Assert.IsTrue (GetInstance ("<root/>").CanEdit); } + + [Test] + public void DeleteSelfAttribute () + { + // bug #376210. + XmlDocument document = new XmlDocument (); + document.LoadXml ("<test><node date='2000-12-23'>z</node></test>"); + XPathNavigator navigator = document.CreateNavigator (); + XPathNavigator nodeElement = navigator.SelectSingleNode ("//node"); + nodeElement.MoveToAttribute ("date", String.Empty); + nodeElement.DeleteSelf (); + Assert.AreEqual ("<test><node>z</node></test>", document.OuterXml); + } } } |