New tests, updates
[mono.git] / mcs / class / System.XML / Test / System.Xml.XPath / XPathNavigatorCommonTests.cs
index 0def2c415a09d961ccd39e277e0ed76b14fc57e6..08afa61e3139382507aea42b1001f890c2e90557 100644 (file)
@@ -451,6 +451,19 @@ namespace MonoTests.System.Xml
 </one>";
                        AssertEquals (ret, nav.OuterXml.Replace ("\r\n", "\n"));
                }
+
+               [Test]
+               public void ReadSubtreeLookupNamespace ()
+               {
+                       string xml = "<x:foo xmlns:x='urn:x'><bar>x:val</bar></x:foo>";
+                       var doc = new XmlDocument ();
+                       doc.LoadXml (xml);
+                       XPathNavigator nav = doc.LastChild.LastChild.CreateNavigator ();
+                       var xr = nav.ReadSubtree ();
+                       xr.MoveToContent ();
+                       xr.Read (); // should be at x:val
+                       AssertEquals ("urn:x", xr.LookupNamespace ("x"));
+               }
 #endif
 
                [Test]