Author: gert
Date: 2007-10-11 14:16:21 -0400 (Thu, 11 Oct 2007)
New Revision: 87353

Modified:
   trunk/gert/standalone/bug332409/test.cs
Log:
Improved test by jpobst.


Modified: trunk/gert/standalone/bug332409/test.cs
===================================================================
--- trunk/gert/standalone/bug332409/test.cs     2007-10-11 18:04:02 UTC (rev 
87352)
+++ trunk/gert/standalone/bug332409/test.cs     2007-10-11 18:16:21 UTC (rev 
87353)
@@ -1,3 +1,4 @@
+using System;
 using System.Windows.Forms;
 
 class Program
@@ -2,8 +3,22 @@
 {
-       static void Main ()
+       static int Main ()
        {
-               Form a = new Form ();
-               a.Show ();
+               Form form = new Form ();
+               form.KeyDown += new KeyEventHandler (Form_KeyDown);
+               form.Show ();
                SendKeys.SendWait ("a");
+
+               if (_keyDown == null)
+                       return 1;
+               if (_keyDown != "A")
+                       return 2;
+               return 0;
        }
+
+       static void Form_KeyDown (object sender, KeyEventArgs e)
+       {
+               _keyDown = e.KeyData.ToString ();
+       }
+
+       private static string _keyDown;
 }

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to