add test for #7719
authorBertram Felgenhauer <int-e@gmx.de>
Sat, 20 Apr 2013 18:19:54 +0000 (20:19 +0200)
committerIan Lynagh <ian@well-typed.com>
Sun, 21 Apr 2013 12:37:14 +0000 (13:37 +0100)
tests/System/Timeout001.hs [new file with mode: 0644]
tests/System/all.T

diff --git a/tests/System/Timeout001.hs b/tests/System/Timeout001.hs
new file mode 100644 (file)
index 0000000..c086ae7
--- /dev/null
@@ -0,0 +1,10 @@
+-- test for escaping Timeout exceptions, see #7719
+
+import System.Timeout
+import Control.Monad
+import Control.Concurrent
+
+t d = timeout d $ timeout d $ timeout d $ timeout d $ timeout d $ timeout (10^9) $ threadDelay 100
+
+main = forM_ [1..20] $ \_ -> forM_ [1..40] t
+
index 96f362e..a6894fa 100644 (file)
@@ -6,4 +6,4 @@ test('T5930',   normal, compile_and_run, [''])
 
 test('system001',   when(opsys("mingw32"), expect_fail), \
        compile_and_run, [''])
-
+test('Timeout001', normal, compile_and_run, [''])