2010-01-26 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.XML / Test / System.Xml.Schema / XmlSchemaSetTests.cs
index 6318ba5b2d5e84d85b24b7e753eb66103cefc16c..d5078cbc5afd0fc4b1e521345167fbec865e6f26 100644 (file)
@@ -209,6 +209,15 @@ type=""xsd:string"" use=""required""/>
                        // (and conformance error as its result)
                        xss.Compile ();
                }
+
+               [Test]
+               public void AddWithNullTargetNS () // bug #571650
+               {
+                       var xsdraw = "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'><xs:element name='foo' /></xs:schema>";
+                       var schemas = new XmlSchemaSet ();
+                       var xsd = schemas.Add ("", XmlReader.Create (new StringReader (xsdraw)));
+                       Assert.IsNull (xsd.TargetNamespace, "#1");
+               }
        }
 }
 #endif