[interp] disable assemblyresolve_event6.exe
[mono.git] / mono / tests / unhandled-exception-3.cs
index 2afa9ad3505d7c17fc72f37343b3455da946aa29..5805614c69131c08992c771af7b1247a932fc2f8 100644 (file)
@@ -9,9 +9,12 @@ class CustomException : Exception
 
 class Driver
 {
-       /* expected exit code: 0 */
+       /* expected exit code: 255 */
        static void Main (string[] args)
        {
+               if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null)
+                       AppDomain.CurrentDomain.UnhandledException += (s, e) => {};
+
                ManualResetEvent mre = new ManualResetEvent (false);
 
                ThreadPool.QueueUserWorkItem (_ => { try { throw new CustomException (); } finally { mre.Set (); } });
@@ -19,8 +22,8 @@ class Driver
                if (!mre.WaitOne (5000))
                        Environment.Exit (2);
 
-               /* Give a chance to the threadpool thread to finish executing the exception
-                * unwinding after the finally, before we exit with status 0 on the current thread */
+               /* Give a chance to the threadpool thread to finish executing the exception unwinding
+                * after the finally, before we exit with status 0 on the current thread */
                Thread.Sleep (1000);
 
                Environment.Exit (0);