Imported Upstream version 6.4.0.137

Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-26 19:53:28 +00:00
parent e9207cf623
commit ef583813eb
2712 changed files with 74169 additions and 40587 deletions

View File

@@ -223,15 +223,15 @@ namespace MonoTests.System.Security.Cryptography.Xml {
return sb.ToString ();
}
static string xml = "<Test attrib='at ' xmlns=\"http://www.go-mono.com/\" > \r\n &#xD; <Toto/> text &amp; </Test >";
static string xml = "<Test attrib='at ' xmlns=\"http://www.example.com/\" > \r\n &#xD; <Toto/> text &amp; </Test >";
// BAD for XmlDocument input (framework 1.0 result)
static string c14xml1 = "<Test xmlns=\"http://www.go-mono.com/\" attrib=\"at \"> \r\n \r <Toto></Toto> text &amp; </Test>";
static string c14xml1 = "<Test xmlns=\"http://www.example.com/\" attrib=\"at \"> \r\n \r <Toto></Toto> text &amp; </Test>";
// GOOD for Stream input
static string c14xml2 = "<Test xmlns=\"http://www.go-mono.com/\" attrib=\"at \"> \n &#xD; <Toto></Toto> text &amp; </Test>";
static string c14xml2 = "<Test xmlns=\"http://www.example.com/\" attrib=\"at \"> \n &#xD; <Toto></Toto> text &amp; </Test>";
// GOOD for XmlDocument input. The difference is because once
// xml string is loaded to XmlDocument, there is no difference
// between \r and &#xD;, so every \r must be handled as &#xD;.
static string c14xml3 = "<Test xmlns=\"http://www.go-mono.com/\" attrib=\"at \"> &#xD;\n &#xD; <Toto></Toto> text &amp; </Test>";
static string c14xml3 = "<Test xmlns=\"http://www.example.com/\" attrib=\"at \"> &#xD;\n &#xD; <Toto></Toto> text &amp; </Test>";
private XmlDocument GetDoc ()
{
@@ -260,7 +260,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
transform.LoadInput (doc.ChildNodes);
Stream s = (Stream) transform.GetOutput ();
string output = Stream2String (s);
Assert.AreEqual ("<Test xmlns=\"http://www.go-mono.com/\"></Test>", output, "XmlChildNodes");
Assert.AreEqual ("<Test xmlns=\"http://www.example.com/\"></Test>", output, "XmlChildNodes");
}
[Test]
@@ -273,7 +273,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
transform.LoadInput (doc.SelectNodes ("//*"));
Stream s = (Stream) transform.GetOutput ();
string output = Stream2String (s);
string expected = "<Test xmlns=\"http://www.go-mono.com/\"><Toto></Toto></Test>";
string expected = "<Test xmlns=\"http://www.example.com/\"><Toto></Toto></Test>";
Assert.AreEqual (expected, output, "XmlChildNodes");
}