2009-01-16 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sat, 17 Jan 2009 01:26:47 +0000 (01:26 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Sat, 17 Jan 2009 01:26:47 +0000 (01:26 -0000)
* ClipboardTest.cs: New tests file.

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

mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs [new file with mode: 0644]

index 5361aa89d8082e110f1d6df8edeee770dfb6c310..39d4014993abdb098ec6b85ba46921ac51cdc899 100644 (file)
@@ -1,3 +1,7 @@
+2009-01-16  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ClipboardTest.cs: New tests file.
+
 2009-01-16  Jonathan Pobst  <monkey@jpobst.com>
 
        * FormEventTest.cs: Disable failing test that was enabled in r118455.
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs
new file mode 100644 (file)
index 0000000..7b248a2
--- /dev/null
@@ -0,0 +1,48 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
+//
+// Author:
+//     Carlos Alberto Cortez <ccortes@novell.com>
+//
+
+using System;
+using System.Text;
+using System.Windows.Forms;
+using NUnit.Framework;
+
+namespace MonoTests.System.Windows.Forms
+{
+       [TestFixture]
+       public class ClipboardTest
+       {
+               [Test]
+               public void TextTest ()
+               {
+                       // Put some unicode chars
+                       string text = "hello \u1000 mono!";
+                       Clipboard.SetText (text);
+
+                       Assert.AreEqual (true, Clipboard.ContainsText (TextDataFormat.UnicodeText), "#A1");
+                       Assert.AreEqual (text, Clipboard.GetText (TextDataFormat.UnicodeText), "#A2");
+               }
+       }
+}
+