diff options
-rw-r--r-- | testsuite/tests/stranal/should_run/T19841.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_run/T19841.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_run/all.T | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_run/T19841.hs b/testsuite/tests/stranal/should_run/T19841.hs new file mode 100644 index 0000000000..ff05c19297 --- /dev/null +++ b/testsuite/tests/stranal/should_run/T19841.hs @@ -0,0 +1,14 @@ +module Main where + +import Control.Exception +import Debug.Trace +import System.IO + +data MyException = MyException deriving Show +instance Exception MyException + +main :: IO () +main = handle (\ MyException -> hPutStrLn stderr "Exception") $ do + trace "Debugging" 5 + `seq` throw MyException + `seq` hPutStrLn stderr "Survived Exception" diff --git a/testsuite/tests/stranal/should_run/T19841.stderr b/testsuite/tests/stranal/should_run/T19841.stderr new file mode 100644 index 0000000000..d5f1763b70 --- /dev/null +++ b/testsuite/tests/stranal/should_run/T19841.stderr @@ -0,0 +1,2 @@ +Debugging +Exception diff --git a/testsuite/tests/stranal/should_run/all.T b/testsuite/tests/stranal/should_run/all.T index e28b0ef7ee..47a4af4e5a 100644 --- a/testsuite/tests/stranal/should_run/all.T +++ b/testsuite/tests/stranal/should_run/all.T @@ -27,3 +27,4 @@ test('T14290', normal, compile_and_run, ['']) test('T14285', normal, multimod_compile_and_run, ['T14285', '']) test('T17676', normal, compile_and_run, ['']) test('T19053', normal, compile_and_run, ['']) +test('T19841', normal, compile_and_run, ['']) |