[commit: base] master: add test for #7719 (57759ce)

Ian Lynagh igloo at earth.li
Sun Apr 21 15:26:16 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

https://github.com/ghc/packages-base/commit/57759ce724bc9cbea435f6f2c655bb7e5cc0267d

>---------------------------------------------------------------

commit 57759ce724bc9cbea435f6f2c655bb7e5cc0267d
Author: Bertram Felgenhauer <int-e at gmx.de>
Date:   Sat Apr 20 20:19:54 2013 +0200

    add test for #7719

>---------------------------------------------------------------

 tests/System/Timeout001.hs |   10 ++++++++++
 tests/System/all.T         |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/tests/System/Timeout001.hs b/tests/System/Timeout001.hs
new file mode 100644
index 0000000..c086ae7
--- /dev/null
+++ b/tests/System/Timeout001.hs
@@ -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
+
diff --git a/tests/System/all.T b/tests/System/all.T
index 96f362e..a6894fa 100644
--- a/tests/System/all.T
+++ b/tests/System/all.T
@@ -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, [''])





More information about the ghc-commits mailing list