From 57759ce724bc9cbea435f6f2c655bb7e5cc0267d Mon Sep 17 00:00:00 2001 From: Bertram Felgenhauer Date: Sat, 20 Apr 2013 20:19:54 +0200 Subject: [PATCH] add test for #7719 --- tests/System/Timeout001.hs | 10 ++++++++++ tests/System/all.T | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/System/Timeout001.hs diff --git a/tests/System/Timeout001.hs b/tests/System/Timeout001.hs new file mode 100644 index 00000000..c086ae76 --- /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 96f362eb..a6894fa9 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, [''])