* SecurityElementTest.cs: Added tests for using single quotes as
authorGert Driesen <drieseng@users.sourceforge.net>
Sun, 14 Oct 2007 15:05:28 +0000 (15:05 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Sun, 14 Oct 2007 15:05:28 +0000 (15:05 -0000)
delimiter of which one passes on Mono and one on MS (due to bug).

svn path=/trunk/mcs/; revision=87462

mcs/class/corlib/Test/System.Security/ChangeLog
mcs/class/corlib/Test/System.Security/SecurityElementTest.cs

index 0e0312cdcfa2bacdb7c21ba01b4e923ae0097f22..77a0ce84cdd9b3c00aba04b5a8dfa78907e85486 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-14  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * SecurityElementTest.cs: Added tests for using single quotes as
+       delimiter of which one passes on Mono and one on MS (due to bug). 
+
 2007-10-14  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * SecurityElementTest.cs: Modified test for bug #333699 to use double
index 3a352af4957b558facdf6f06f86fc3fa2ce09db2..bc263afb7f780d868edc5889b772ab18dc785b72 100644 (file)
@@ -669,6 +669,30 @@ namespace MonoTests.System.Security {
                        Assert.IsNull (child.Attributes, "#C3");
                }
 
+               [Test]
+               [Category ("NotDotNet")] // MS bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=304583
+               public void FromString_Quote_Delimiter ()
+               {
+                       const string xml = "<value name='Company'>Novell</value>";
+                       SecurityElement se = SecurityElement.FromString (xml);
+                       Assert.AreEqual ("Company", se.Attribute ("name"), "#1");
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "<value name=\"Company\">Novell</value>{0}",
+                               Environment.NewLine), se.ToString (), "#2");
+               }
+
+               [Test]
+               [Category ("NotWorking")] // MS bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=304583
+               public void FromString_Quote_Delimiter_MS ()
+               {
+                       const string xml = "<value name='Company'>Novell</value>";
+                       SecurityElement se = SecurityElement.FromString (xml);
+                       Assert.AreEqual ("'Company'", se.Attribute ("name"), "#1");
+                       Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+                               "<value name=\"'Company'\">Novell</value>{0}",
+                               Environment.NewLine), se.ToString (), "#2");
+               }
+
                [Test] // bug #333699
                [Category ("NotWorking")]
                public void FromString_EntityReferences ()