Imported Upstream version 4.2.0.179

Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent 183bba2c9a
commit 6992685b86
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -163,7 +163,7 @@ namespace MonoTests.System.Xml
ss.Compile ();
Assert.IsTrue (ss.IsCompiled, "#4");
ss.RemoveRecursive (s);
Assert.IsTrue (ss.IsCompiled, "#5");
Assert.IsFalse (ss.IsCompiled, "#5");
}
[Test] // bug #77489

View File

@@ -20,7 +20,8 @@ namespace MonoTests.System.Xml
[TestFixture]
public class XmlSchemaTests : XmlSchemaAssertion
{
static readonly bool StrictMsCompliant = Environment.GetEnvironmentVariable ("MONO_STRICT_MS_COMPLIANT") == "yes";
// Whatever this flag is used is buggy tests. Now mono implementation is MS reference source based, so enabled.
static readonly bool StrictMsCompliant = true;// Environment.GetEnvironmentVariable ("MONO_STRICT_MS_COMPLIANT") == "yes";
[Test]
public void TestRead ()
@@ -537,6 +538,7 @@ namespace MonoTests.System.Xml
}
[Test]
[Ignore (".NET fails as well as referencesource")]
public void TestResolveUri ()
{
XmlSchemaSet schemaSet = new XmlSchemaSet ();
@@ -583,6 +585,7 @@ namespace MonoTests.System.Xml
}
[Test]
[Ignore (".NET fails as well as referencesource")]
public void TestImportSchemaThatIncludesAnother ()
{
XmlSchema xs = GetSchema ("Test/XmlFiles/xsd/importNamespaceTest2.xsd");

View File

@@ -75,6 +75,7 @@ namespace MonoTests.System.Xml.Serialization.Advanced
[Test]
[Category ("NotDotNet")] // NRE happens there.
[Ignore ("Microsoft referencesource fails")]
[ExpectedException (typeof (ArgumentNullException))]
public void AddTypeNull ()
{

View File

@@ -44,6 +44,7 @@ namespace MonoTests.System.XmlSerialization
[Test]
[NUnit.Framework.Category ("NotDotNet")] // MS.NET results in compilation error (probably it generates bogus source.)
[NUnit.Framework.Category ("MobileNotWorking")]
public void ReadLiteral ()
{
XmlSerializer ss = new XmlSerializer (GetLiteralTypeMapping ());
@@ -286,17 +287,17 @@ namespace MonoTests.System.XmlSerialization
AssertionHelper.AssertEqualsArray ("t.ttList", exp.ttList.ToArray(), t.ttList.ToArray());
Assert.IsNotNull (t.RoList, "t.RoList");
Assert.AreEqual (exp.RoList.Count, t.RoList.Count, "t.RoList.Count");
for (int n=0; n<exp.RoList.Count; n++)
// Assert.AreEqual (exp.RoList.Count, t.RoList.Count, "t.RoList.Count");
for (int n=0; n<t.RoList.Count; n++)
TestPart.AssertEquals ("t.RoList " + n, (TestPart)exp.RoList[n], (TestPart)t.RoList[n]);
Assert.AreEqual (exp.struc.aa, t.struc.aa, "t.struc.aa");
Assert.AreSame (exp.struc.cc, t.struc.cc, "t.struc.cc");
Assert.IsNotNull (t.multiList, "t.multiList");
Assert.AreEqual (exp.multiList.Length, t.multiList.Length, "t.multiList.Count");
for (int n=0; n<exp.multiList.Length; n++)
AssertionHelper.AssertEqualsArray ("t.multiList " + n, exp.multiList[n].ToArray(), t.multiList[n].ToArray());
Assert.IsNull (t.multiList, "t.multiList");
// Assert.AreEqual (exp.multiList.Length, t.multiList.Length, "t.multiList.Count");
// for (int n=0; n<exp.multiList.Length; n++)
// AssertionHelper.AssertEqualsArray ("t.multiList " + n, exp.multiList[n].ToArray(), t.multiList[n].ToArray());
Assert.AreEqual (exp.defElem, t.defElem, "t.defElem");
Assert.AreEqual (exp.defAttr, t.defAttr, "t.defAttr");
@@ -305,18 +306,18 @@ namespace MonoTests.System.XmlSerialization
Assert.AreEqual (exp.attqname, t.attqname, "t.attqname");
Assert.IsNotNull (t.dbscontainer, "t.dbscontainer");
DblStringContainer tdbca = t.dbscontainer.at as DblStringContainer;
DblStringContainer expdbca = exp.dbscontainer.at as DblStringContainer;
Assert.IsNotNull (tdbca, "t.dbscontainer.at");
Assert.IsNull (t.dbscontainer, "t.dbscontainer");
// DblStringContainer tdbca = t.dbscontainer.at as DblStringContainer;
// DblStringContainer expdbca = exp.dbscontainer.at as DblStringContainer;
// Assert.IsNotNull (tdbca, "t.dbscontainer.at");
Assert.IsNotNull (tdbca, "t.dbscontainer.dbca");
AssertionHelper.AssertEqualsArray ("t.dbscontainer.at.doublestring", expdbca.doublestring, tdbca.doublestring);
// Assert.IsNotNull (tdbca, "t.dbscontainer.dbca");
// AssertionHelper.AssertEqualsArray ("t.dbscontainer.at.doublestring", expdbca.doublestring, tdbca.doublestring);
AnotherTestPart tat = tdbca.at as AnotherTestPart;
AnotherTestPart expat = expdbca.at as AnotherTestPart;
Assert.IsNotNull (tat, "t.dbscontainer.dbca.at");
Assert.AreEqual (expat.lo, tat.lo, "t.dbscontainer.dbca.at.lo");
// AnotherTestPart tat = tdbca.at as AnotherTestPart;
// AnotherTestPart expat = expdbca.at as AnotherTestPart;
// Assert.IsNotNull (tat, "t.dbscontainer.dbca.at");
// Assert.AreEqual (expat.lo, tat.lo, "t.dbscontainer.dbca.at.lo");
}
void CheckParts (string id, TestPart[] exp, TestPart[] parts)
@@ -514,7 +515,7 @@ namespace MonoTests.System.XmlSerialization
}
[SoapIgnore]
// [XmlIgnore]
[XmlIgnore] // Causes NRE in System.Xml.Serialization.CodeGenerator.GetVariableType (System.Object var)
public ArrayList[] multiList;
[SoapIgnore]

View File

@@ -163,7 +163,8 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("NotDotNet")]
[Category ("MobileNotWorking")]
[ExpectedException (typeof (InvalidOperationException))]
public void DeserializeArrayReferences ()
{
string s = "<Sample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">";
@@ -248,7 +249,6 @@ namespace MonoTests.System.XmlSerialization
ListDefaults d2 = (ListDefaults) Deserialize (typeof (ListDefaults), "<root/>");
Assert.IsNotNull (d2.list2, "#A1");
Assert.IsNull (d2.list3, "#A2");
Assert.IsNull (d2.list4, "#A3");
Assert.IsNotNull (d2.list5, "#A4");
Assert.IsNotNull (d2.ed, "#A5");
@@ -257,7 +257,6 @@ namespace MonoTests.System.XmlSerialization
d2 = (ListDefaults) Deserialize (typeof (ListDefaults), "<root></root>");
Assert.IsNotNull (d2.list2, "#B1");
Assert.IsNull (d2.list3, "#B2");
Assert.IsNull (d2.list4, "#B3");
Assert.IsNotNull (d2.list5, "#B4");
Assert.IsNotNull (d2.ed, "#B5");
@@ -819,7 +818,7 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[ExpectedException (typeof (InvalidOperationException))]
[Category ("MobileNotWorking")]
public void TestDeserializeObjectWithReadonlyNulCollection ()
{
string s3 = "";
@@ -830,7 +829,8 @@ namespace MonoTests.System.XmlSerialization
s3 += " </Collection1>";
s3 += "</Container>";
Deserialize (typeof (ObjectWithReadonlyNulCollection), s3);
var obj = (ObjectWithReadonlyNulCollection) Deserialize (typeof (ObjectWithReadonlyNulCollection), s3);
Assert.IsNull (obj.Collection1);
}
[Test]
@@ -1060,7 +1060,7 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("NotDotNet")] // MS.NET results in compilation error (probably it generates bogus source.)
[Category ("NotWorking")] // MS.NET results in compilation error (probably it generates bogus source.)
public void TestDeserialize_Field_Encoded ()
{
Field_Encoded f = null;
@@ -1547,11 +1547,12 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("MobileNotWorking")]
public void NotExactDateParse ()
{
XmlSerializer xs = new XmlSerializer (typeof (NotExactDateParseClass));
NotExactDateParseClass o = (NotExactDateParseClass) xs.Deserialize (new StringReader ("<NotExactDateParseClass xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SomeDate xsi:type=\"xsd:date\">2012-02-05-09:00</SomeDate></NotExactDateParseClass>"));
Assert.AreEqual (new DateTime (2012,2,5), o.SomeDate);
Assert.AreEqual (new DateTime (2012,2,5,9,0,0,DateTimeKind.Utc), o.SomeDate.ToUniversalTime ());
}

View File

@@ -20,15 +20,12 @@ namespace MonoTests.System.XmlSerialization
public class SoapAttributesTests
{
[Test]
// in .NET 2.0, SoapDefaultValue should be null by default, but we need
// more tests before making this change
[Category ("NotDotNet")]
[Category ("MobileNotWorking")]
public void Defaults ()
{
SoapAttributes atts = new SoapAttributes ();
Assert.IsNull (atts.SoapAttribute, "#1");
Assert.IsNotNull (atts.SoapDefaultValue, "#2");
Assert.AreEqual (DBNull.Value, atts.SoapDefaultValue, "#3");
Assert.IsNull (atts.SoapDefaultValue, "#2");
Assert.IsNull (atts.SoapElement, "#4");
Assert.IsNull (atts.SoapEnum, "#5");
Assert.AreEqual (false, atts.SoapIgnore, "#6");

View File

@@ -62,6 +62,7 @@ namespace MonoTests.System.XmlSerialization
// Testcases.
[Test]
[Category ("MobileNotWorking")]
public void NewXmlAttributes ()
{
// seems not different from Type specified ctor().
@@ -74,9 +75,7 @@ namespace MonoTests.System.XmlSerialization
Assert.AreEqual (0, atts.XmlArrayItems.Count, "#6");
Assert.IsNull (atts.XmlAttribute, "#7");
Assert.IsNull (atts.XmlChoiceIdentifier, "#8");
Assert.IsNotNull (atts.XmlDefaultValue, "#9");
// DBNull??
Assert.AreEqual (DBNull.Value, atts.XmlDefaultValue, "#10");
Assert.IsNull (atts.XmlDefaultValue, "#9");
Assert.IsNotNull (atts.XmlElements, "#11");
Assert.AreEqual (0, atts.XmlElements.Count, "#12");
Assert.IsNull (atts.XmlEnum, "#13");

View File

@@ -2053,7 +2053,7 @@ namespace MonoTests.System.XmlSerialization
writer.Close ();
Assert.AreEqual (@"<?xml version=""1.0"" encoding=""utf-16""?>
<Bug594490Class xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xml:lang=""hello world"" />",
<Bug594490Class xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xml:lang=""hello world"" />",
writer.ToString (),
"Novell bug #594490 (https://bugzilla.novell.com/show_bug.cgi?id=594490) not fixed.");
}

View File

@@ -455,7 +455,7 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Ignore ("Additional namespace prefixes are added")]
[Category ("MobileNotWorking")]
public void TestWritePotentiallyReferencingElement ()
{
XmlSerializarionWriterTester xsw = new XmlSerializarionWriterTester ();
@@ -497,13 +497,6 @@ namespace MonoTests.System.XmlSerialization
"</q3:Array>", XmlSchemaNamespace, SoapEncodingNamespace), xsw.Content, "#5");
}
[Test]
public void TestWriteSerializable()
{
// FIXME
//Assert.AreEqual (, "");
}
[Test]
public void TestWriteStartDocument()
{
@@ -836,7 +829,6 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("NotWorking")] // enum name is output instead of integral value
public void TestWriteTypedPrimitive_Enum ()
{
XmlSerializarionWriterTester xsw = new XmlSerializarionWriterTester ();
@@ -884,7 +876,6 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("NotWorking")] // InvalidOperationException is thrown
public void TestWriteTypedPrimitive_Enum_XsiType ()
{
XmlSerializarionWriterTester xsw = new XmlSerializarionWriterTester ();
@@ -1567,9 +1558,10 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
[Category ("MobileNotWorking")]
public void TestNullableDatesAndTimes ()
{
DateTime dt = new DateTime (2012, 1, 3, 10, 0, 0, 0);
DateTime dt = new DateTime (2012, 1, 3, 10, 0, 0, 0, DateTimeKind.Utc);
var d = new NullableDatesAndTimes () {
MyTime = dt,
@@ -1583,12 +1575,30 @@ namespace MonoTests.System.XmlSerialization
ser.Serialize (sw, d);
string str = sw.ToString ();
Assert.IsTrue (str.IndexOf ("<MyTime>10:00:00</MyTime>") != -1, "Time");
Assert.IsTrue (str.IndexOf ("<MyTimeNullable>10:00:00</MyTimeNullable>") != -1, "Nullable Time");
Assert.IsTrue (str.IndexOf ("<MyDate>2012-01-03</MyDate>") != -1, "Date");
Assert.IsTrue (str.IndexOf ("<MyDateNullable>2012-01-03</MyDateNullable>") != -1, "Nullable Datwe");
str = RemoveTZ (str, "MyTime");
str = RemoveTZ (str, "MyTimeNullable");
var expected =
"<?xml version=\"1.0\" encoding=\"utf-16\"?>" + Environment.NewLine +
"<root xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" + Environment.NewLine +
" <MyTime>10:00:00.0000000$TZ$</MyTime>" + Environment.NewLine +
" <MyTimeNullable>10:00:00.0000000$TZ$</MyTimeNullable>" + Environment.NewLine +
" <MyDate>2012-01-03</MyDate>" + Environment.NewLine +
" <MyDateNullable>2012-01-03</MyDateNullable>" + Environment.NewLine +
"</root>";
Assert.AreEqual (expected, str);
}
static string RemoveTZ (string str, string tag)
{
var st = str.IndexOf ("<" + tag + ">");
var et = str.IndexOf ("</" + tag + ">");
if (st < 0 || et < 0)
return str;
var start = str.IndexOfAny (new [] { '+', '-' }, st, et - st);
return str.Substring (0, start) + "$TZ$" + str.Substring (et, str.Length - et);
}
}
}

View File

@@ -465,7 +465,7 @@ namespace MonoTests.System.Xml.TestClasses
public ArrayList list2;
public MyList list3;
// public MyList list3;
public string[] list4;

View File

@@ -1 +1 @@
dd9daa2f49ee069b61b98e305123c007a3f827ae
4e51eceae03b32f848de53e915a039f8bb497709

View File

@@ -772,6 +772,7 @@ namespace MonoTests.System.Xml.XPath
}
[Test]
[Ignore ("Microsoft reference source causes InvalidOperationException")]
public void WriteAttributeOnAppendedChild ()
{
XmlDocument x = new XmlDocument ();

View File

@@ -341,6 +341,7 @@ namespace MonoTests.System.Xml.XPath
[Test]
[Category ("NotDotNet")] // MS bug
[Ignore ("Bug in Microsoft reference source")]
public void AttributesAndNamespaces ()
{
string xml = "<root attr='value' x:a2='v2' xmlns:x='urn:foo' xmlns='urn:default'></root>";

View File

@@ -591,6 +591,11 @@ namespace MonoTests.System.Xml
Assert.AreEqual ("val1", iter.Current.InnerXml, "#1");
}
string AlterNewLine (string s)
{
return s.Replace ("\r\n", Environment.NewLine);
}
[Test]
public void InnerXmlTextEscape ()
{
@@ -599,16 +604,17 @@ namespace MonoTests.System.Xml
XPathNavigator nav = doc.CreateNavigator ();
XPathNodeIterator iter = nav.Select ("/Abc/Foo");
iter.MoveNext ();
Assert.AreEqual ("Hello&lt;\r\nInnerXml", iter.Current.InnerXml, "#1");
Assert.AreEqual ("<Foo>Hello&lt;\r\nInnerXml</Foo>", iter.Current.OuterXml, "#2");
Assert.AreEqual (AlterNewLine ("Hello&lt;\r\nInnerXml"), iter.Current.InnerXml, "#1");
Assert.AreEqual (AlterNewLine ("<Foo>Hello&lt;\r\nInnerXml</Foo>"), iter.Current.OuterXml, "#2");
iter = nav.Select ("/Abc/Foo/text()");
iter.MoveNext ();
Assert.AreEqual (String.Empty, iter.Current.InnerXml, "#3");
Assert.AreEqual ("Hello&lt;\r\nInnerXml", iter.Current.OuterXml, "#4");
Assert.AreEqual (AlterNewLine ("Hello&lt;\r\nInnerXml"), iter.Current.OuterXml, "#4");
}
[Test]
[Category ("NotDotNet")] // .NET bug; it should escape value
[Ignore ("Bug in Microsoft reference source")]
public void InnerXmlAttributeEscape ()
{
StringReader sr = new StringReader ("<Abc><Foo attr='val&quot;1&#13;&#10;&gt;'/></Abc>");

View File

@@ -36,6 +36,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
}
[Test]
[Category ("MobileNotWorking")]
public void MSXslNodeSetAcceptsNodeSet ()
{
string xsl = @"<xsl:stylesheet version='1.0'
@@ -57,6 +58,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
}
[Test]
[Category ("MobileNotWorking")]
public void MSXslNodeSetAcceptsEmptyString ()
{
string xsl = @"<xsl:stylesheet version='1.0'
@@ -135,11 +137,36 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
t.Load (new XmlTextReader (new StringReader (xsl)));
var source = "<?xml version='1.0' encoding='utf-8' ?><Node><Name>123</Name></Node>";
#if MOBILE
var expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Node name=\"123\"></Node>";
#else
var expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Node name=\"123\" />";
#endif
StringWriter sw = new StringWriter ();
t.Transform (new XPathDocument (new XmlTextReader (new StringReader (source))), null, sw);
var xp = new XPathDocument (new XmlTextReader (new StringReader (source)));
t.Transform (xp, null, sw);
Assert.AreEqual (expected, sw.ToString ());
}
[Test] // bug 2917
[Category ("MobileNotWorking")]
public void XslOutputSettings ()
{
XslCompiledTransform xslCompiledTransform = new XslCompiledTransform();
string xsl =
@"<?xml version=""1.0"" encoding=""UTF-8"" ?>
<xsl:stylesheet version=""1.0"" xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" xmlns:extensions=""urn:extensions"" exclude-result-prefixes=""extensions"">
<xsl:output method=""xml"" indent=""yes""/>
<xsl:template match="" / ""></xsl:template>
</xsl:stylesheet>";
var xmlReader = XmlReader.Create(new StringReader(xsl));
xslCompiledTransform.Load(xmlReader);
// Returns true on .NET and False on mono 2.10.2
Assert.IsTrue (xslCompiledTransform.OutputSettings.Indent, "#1");
}
}
}

View File

@@ -21,6 +21,8 @@ namespace MonoTests.System.Xml.Xsl
[TestFixture]
public class XslTransformTests
{
static readonly string end_of_line = "\r\n";
XmlDocument doc;
XslTransform xslt;
XmlDocument result;
@@ -150,11 +152,6 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
}
[Test]
[Category ("NotDotNet")]
// Actually MS.NET here throws XsltException, but Mono returns
// XPathException (since XPath evaluation engine generally
// catches (should catch) static error. It is implementation
// dependent matter.
[ExpectedException (typeof (XPathException))]
public void MSXslNodeSetRejectsNodeSet ()
{
@@ -415,7 +412,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
// http://support.microsoft.com/default.aspx?scid=kb;en-us;834667
[Test]
[Category ("NotDotNet")]
//[Category ("NotDotNet")]
public void LocalParameter ()
{
string xsltFragment = @"<?xml version=""1.0"" encoding=""UTF-8"" ?>
@@ -999,7 +996,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
" <something>{0}" +
" <else />{0}" +
" </something>{0}" +
"</test>", Environment.NewLine), sw.ToString (), "#1");
"</test>", end_of_line), sw.ToString (), "#1");
// set indent to no
sw.GetStringBuilder ().Length = 0;
@@ -1134,7 +1131,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
" <something>{0}" +
" <else />{0}" +
" </something>{0}" +
"</test>", Environment.NewLine), sw.ToString (), "#1");
"</test>", end_of_line), sw.ToString (), "#1");
// set indent to no
sw.GetStringBuilder ().Length = 0;
@@ -1585,7 +1582,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
"{1}<Body>{0}" +
"{1}{1}<BR>{0}" +
"{1}</Body>{0}" +
"</html>", Environment.NewLine, " "), sw.ToString (), "#1");
"</html>", end_of_line, " "), sw.ToString (), "#1");
// indent no, media-type not set
options = "indent=\"no\"";
@@ -1624,7 +1621,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
"{1}<Body>{0}" +
"{1}{1}<BR>{0}" +
"{1}</Body>{0}" +
"</html>", Environment.NewLine, " "), sw.ToString (), "#3");
"</html>", end_of_line, " "), sw.ToString (), "#3");
}
[Test]
@@ -1674,7 +1671,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
"{1}<Body>{0}" +
"{1}{1}<BR>{0}" +
"{1}</Body>{0}" +
"</html>", Environment.NewLine, " "), result, "#1");
"</html>", end_of_line, " "), result, "#1");
// indent no, media-type not set
options = "indent=\"no\"";
@@ -1721,7 +1718,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
"{1}<Body>{0}" +
"{1}{1}<BR>{0}" +
"{1}</Body>{0}" +
"</html>", Environment.NewLine, " "), result, "#3");
"</html>", end_of_line, " "), result, "#3");
}
[Test]
@@ -1808,7 +1805,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
" <tr>{0}" +
" <td>1,000</td>{0}" +
" </tr>{0}" +
"</table>", Environment.NewLine), sw.ToString ());
"</table>", end_of_line), sw.ToString ());
}
// http://support.microsoft.com/kb/293469/en-us
@@ -1845,7 +1842,7 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
"<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" +
"<html>{0}" +
" <body>44.442,70</body>{0}" +
"</html>", Environment.NewLine), sw.ToString ());
"</html>", end_of_line), sw.ToString ());
}
[Test]
@@ -2330,7 +2327,7 @@ NO
</l0>
</root>")), null, sw);
// Assert.AreEqual (@"<y><t yes-one-node="""">1</t><t not-node=""""></t></y>", sw.ToString ());
Assert.AreEqual ("\r\n \r\n <y><t yes-one-node=\"\">1</t><t not-node=\"\"></t></y>\r\n \r\n", sw.ToString ());
Assert.AreEqual ("\r\n \r\n <y><t yes-one-node=\"\">1</t><t not-node=\"\"></t></y>\r\n \r\n".Replace ("\r\n", Environment.NewLine), sw.ToString ());
}
[Test]
@@ -2364,6 +2361,7 @@ NO
}
[Test]
[Category ("NotWorking")] // FIXME: SRE related regression
public void Bug487065 ()
{
using (XmlReader input = GetInput ()) {

View File

@@ -36,7 +36,7 @@ using System.Security.Permissions;
using System.Security.Policy;
using System.Xml.Xsl;
namespace MonoCasTests.System.Xml.Xsl
namespace MonoTests.System.Xml.Xsl
{
[TestFixture]
public class XsltCompileExceptionTests {

View File

@@ -194,6 +194,7 @@ namespace MonoTests.System.Xml
[Test]
[Category ("NotDotNet")] // enbug
[Ignore ("bug in Microsoft sources")]
public void RemoveDefaultAttribute ()
{
string dtd = "<!DOCTYPE root [<!ELEMENT root EMPTY><!ATTLIST root attr CDATA 'default'>]>";

View File

@@ -87,6 +87,7 @@ namespace MonoTests.System.Xml
[Test]
[Category ("NotDotNet")] // enbug in 2.0
[Ignore ("bug in Microsoft sources")]
public void InsertData ()
{
comment.Value = "foobaz";
@@ -128,6 +129,7 @@ namespace MonoTests.System.Xml
[Test]
[Category ("NotDotNet")] // enbug in 2.0
[Ignore ("bug in Microsoft sources")]
public void ReplaceData ()
{
changed = false;

View File

@@ -71,7 +71,6 @@ namespace MonoTests.System.Xml
}
[Test]
[ExpectedException (typeof (XmlException))]
public void EncodeNmTokenError ()
{
XmlConvert.EncodeNmToken (String.Empty);

Some files were not shown because too many files have changed in this diff Show More